mirror of
https://github.com/Hilbis/Hilbish
synced 2025-03-26 08:20:41 +00:00
fix: make -S flag set absolute path to hilbish
This commit is contained in:
parent
38d036d96f
commit
0e4b95d9b9
9
main.go
9
main.go
@ -6,6 +6,7 @@ import (
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
"os/exec"
|
||||
"os/user"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
@ -115,7 +116,13 @@ func main() {
|
||||
|
||||
// Set $SHELL if the user wants to
|
||||
if *setshflag {
|
||||
os.Setenv("SHELL", os.Args[0])
|
||||
os.Setenv("SHELL", "hilbish")
|
||||
|
||||
path, err := exec.LookPath("hilbish")
|
||||
if err == nil {
|
||||
os.Setenv("SHELL", path)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
lr = newLineReader("", false)
|
||||
|
Loading…
x
Reference in New Issue
Block a user