mirror of
https://github.com/TECHNOFAB11/jsonnet-bundler.git
synced 2025-12-12 08:00: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
|
||||
}
|
||||
|
||||
workdir, err := os.Getwd()
|
||||
if err != nil {
|
||||
return 1
|
||||
}
|
||||
|
||||
switch command {
|
||||
case initCmd.FullCommand():
|
||||
return initCommand()
|
||||
return initCommand(workdir)
|
||||
case installCmd.FullCommand():
|
||||
return installCommand(cfg.JsonnetHome, *installCmdURLs...)
|
||||
return installCommand(workdir, cfg.JsonnetHome, *installCmdURLs...)
|
||||
case updateCmd.FullCommand():
|
||||
return updateCommand(cfg.JsonnetHome)
|
||||
default:
|
||||
installCommand(cfg.JsonnetHome)
|
||||
installCommand(workdir, cfg.JsonnetHome)
|
||||
}
|
||||
|
||||
return 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue