From 6046098d2277ea9d9fc62614fdaf698fd45c3b6c Mon Sep 17 00:00:00 2001 From: zyrouge Date: Wed, 15 Nov 2023 13:11:07 +0530 Subject: [PATCH] refactor: run use cwd as exec dir --- commands/run.go | 7 +++++-- core/meta.go | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/commands/run.go b/commands/run.go index d4dd1ce..19df89b 100644 --- a/commands/run.go +++ b/commands/run.go @@ -5,7 +5,6 @@ import ( "fmt" "os" "os/exec" - "path" "strings" "github.com/fatih/color" @@ -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, diff --git a/core/meta.go b/core/meta.go index f75134c..78e875d 100644 --- a/core/meta.go +++ b/core/meta.go @@ -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"