use standard library in sesh to make directories instead of mkdir program
This commit is contained in:
+1
-8
@@ -55,7 +55,6 @@ type Config map[string][]Window
|
||||
|
||||
const (
|
||||
tmux = "tmux"
|
||||
mkdir = "mkdir"
|
||||
)
|
||||
|
||||
func main() {
|
||||
@@ -64,11 +63,6 @@ func main() {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
_, err = exec.LookPath(mkdir)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
homeDir, err := os.UserHomeDir()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
@@ -161,8 +155,7 @@ func main() {
|
||||
return
|
||||
}
|
||||
for _, window := range sesh {
|
||||
// TODO: use go stdandard library instead
|
||||
exec.Command(mkdir, "-p", window.ExpandedPath()).Run()
|
||||
_ = os.MkdirAll(window.ExpandedPath(), 0775);
|
||||
}
|
||||
for _, window := range sesh {
|
||||
NewWindowInSession(seshName, window)
|
||||
|
||||
Reference in New Issue
Block a user