Skip to content

Commit

Permalink
Set currentPath on profile init rootPath (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
corrupt952 authored Nov 7, 2021
1 parent 36f7d56 commit 8c814d7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions command/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"flag"
"io/ioutil"
"os"
"os/user"
"text/template"

"github.com/google/subcommands"
Expand Down Expand Up @@ -79,7 +78,7 @@ command = "echo 'hello'"`)
logger.Err(err.Error())
return subcommands.ExitFailure
}
usr, err := user.Current()
currentPath, err := os.Getwd()
if err != nil {
logger.Err(err.Error())
return subcommands.ExitFailure
Expand All @@ -88,7 +87,7 @@ command = "echo 'hello'"`)
attach := true
err = tmpl.Execute(&buf, &config.Config{
Name: cmd.profile,
Root: usr.HomeDir,
Root: currentPath,
Attach: &attach,
Windows: []config.Window{},
})
Expand Down

0 comments on commit 8c814d7

Please sign in to comment.