mirror of
https://github.com/TECHNOFAB11/jsonnet-bundler.git
synced 2025-12-11 23:50:05 +01:00
Pass the working dir from main.go
This commit is contained in:
parent
7560a1075c
commit
c516ce2506
1 changed files with 8 additions and 3 deletions
|
|
@ -86,15 +86,20 @@ func Main() int {
|
||||||
return 2
|
return 2
|
||||||
}
|
}
|
||||||
|
|
||||||
|
workdir, err := os.Getwd()
|
||||||
|
if err != nil {
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
switch command {
|
switch command {
|
||||||
case initCmd.FullCommand():
|
case initCmd.FullCommand():
|
||||||
return initCommand()
|
return initCommand(workdir)
|
||||||
case installCmd.FullCommand():
|
case installCmd.FullCommand():
|
||||||
return installCommand(cfg.JsonnetHome, *installCmdURLs...)
|
return installCommand(workdir, cfg.JsonnetHome, *installCmdURLs...)
|
||||||
case updateCmd.FullCommand():
|
case updateCmd.FullCommand():
|
||||||
return updateCommand(cfg.JsonnetHome)
|
return updateCommand(cfg.JsonnetHome)
|
||||||
default:
|
default:
|
||||||
installCommand(cfg.JsonnetHome)
|
installCommand(workdir, cfg.JsonnetHome)
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue