added python path thing
This commit is contained in:
1 parent
f6140a1fc3
commit
7062e798a9
4 files changed
+84
-4
No files matched your search
@@ -0,0 +1,22 @@
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"gosh/types"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/fatih/color"
|
||||
)
|
||||
|
||||
func GolshPyapath(sh *types.Shell, path string) types.CmdOutput {
|
||||
abs, err := filepath.Abs(path)
|
||||
|
||||
red := color.New(color.FgRed).SprintFunc()
|
||||
|
||||
if err != nil {
|
||||
return types.CmdOutput{Id: 1, Output: red(err)}
|
||||
}
|
||||
|
||||
sh.PyPaths = append(sh.PyPaths, abs)
|
||||
|
||||
return types.CmdOutput{Id: 0, Output: ""}
|
||||
}
|
||||
Reference in new issue
Block a user