File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,15 +3,16 @@ package commands
33import (
44 "common/settings"
55 "fmt"
6- "nvm/constant"
76 "nvm/bootstrap"
7+ "nvm/constant"
88 "os"
99 "os/exec"
1010 "path/filepath"
1111)
1212
1313type Upgrade struct {
1414 Check bool `flag:"check" help:"Check for updates without performing the upgrade."`
15+ Force bool `flag:"force" help:"Upgrade without warning about processes that will be closed."`
1516}
1617
1718func (s * Upgrade ) Run () error {
@@ -35,6 +36,9 @@ func (s *Upgrade) Run() error {
3536 if s .Check {
3637 cmd .Args = append (cmd .Args , "--check" )
3738 }
39+ if s .Force {
40+ cmd .Args = append (cmd .Args , "--force" )
41+ }
3842
3943 cmd .Stdout = os .Stdout
4044 cmd .Stderr = os .Stderr
@@ -49,6 +53,7 @@ type Doctor struct {
4953 Autofix bool `flag:"autofix" help:"Automatically fix issues when possible."`
5054 List bool `flag:"list" help:"List all available checks without running them."`
5155 Update bool `flag:"update" help:"Force sync utility asset update before running checks."`
56+ Force bool `flag:"force" help:"When upgrading, do not warn about processes that will be closed."`
5257 constant.FlagJSON
5358}
5459
@@ -68,6 +73,9 @@ func (c *Doctor) Run() error {
6873 if c .Update {
6974 args = append (args , "--update" )
7075 }
76+ if c .Force {
77+ args = append (args , "--force" )
78+ }
7179 if c .JSON {
7280 args = append (args , "--json" )
7381 }
You can’t perform that action at this time.
0 commit comments