Skip to content

Commit

Permalink
refactor: run use cwd as exec dir
Browse files Browse the repository at this point in the history
  • Loading branch information
zyrouge committed Nov 15, 2023
1 parent 4acc703 commit 6046098
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions commands/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"fmt"
"os"
"os/exec"
"path"
"strings"

"github.com/fatih/color"
Expand Down Expand Up @@ -66,9 +65,13 @@ var RunCommand = cli.Command{
}

execPath := app.Paths.AppImage
execDir := path.Dir(execPath)
execDir, err := os.Getwd()
if err != nil {
return err
}
utils.LogDebug(fmt.Sprintf("exec path as %s", execPath))
utils.LogDebug(fmt.Sprintf("exec dir as %s", execDir))

if detached {
detachedOptions := &utils.StartDetachedProcessOptions{
Dir: execDir,
Expand Down
2 changes: 1 addition & 1 deletion core/meta.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ const AppName = "Pho"
const AppCodeName = "pho"
const AppExecutableName = "pho"
const AppDescription = "AppImage Manager"
const AppVersion = "0.1.5"
const AppVersion = "0.1.6"
const AppGithubOwner = "zyrouge"
const AppGithubRepo = "pho"

0 comments on commit 6046098

Please sign in to comment.