mirror of
https://github.com/vbatts/go-mtree.git
synced 2025-06-29 04:58:28 +00:00
test/cli: fixup for supporting OSX
This commit is contained in:
parent
1bcf4de08f
commit
68a6d43233
12 changed files with 54 additions and 27 deletions
22
test/realpath.go
Normal file
22
test/realpath.go
Normal file
|
@ -0,0 +1,22 @@
|
|||
// +build ignore
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
)
|
||||
|
||||
func main() {
|
||||
flag.Parse()
|
||||
for _, arg := range flag.Args() {
|
||||
path, err := filepath.Abs(arg)
|
||||
if err != nil {
|
||||
fmt.Fprint(os.Stderr, err)
|
||||
os.Exit(1)
|
||||
}
|
||||
fmt.Printf("%s", path)
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue