示例#1
0
	},
}

// sub cmd
var versionCmd = &cobra.Command{
	Use:   "version",
	Short: "Print the version number of gnvm.exe",
	Long: `Print the version number of gnvm.exe e.g.
gnvm version
gnvm version --remote`,
	Run: func(cmd *cobra.Command, args []string) {
		// check args
		if len(args) > 0 {
			P(WARING, "'%v' no parameter, please check your input. See '%v'.\n", "gnvm version", "gnvm help version")
		}
		nodehandle.Version(remote)
	},
}

// sub cmd
var installCmd = &cobra.Command{
	Use:   "install",
	Short: "Install any node.exe version",
	Long: `Install any node.exe version e.g.
gnvm install latest
gnvm install x.xx.xx y.yy.yy
gnvm install x.xx.xx --global
gnvm install npm`,
	Run: func(cmd *cobra.Command, args []string) {
		var newArgs []string
示例#2
0
文件: command.go 项目: Kenshin/gnvm
}

// sub cmd
var versionCmd = &cobra.Command{
	Use:   "version",
	Short: "Print GNVM version number",
	Long: `Print GNVM version number e.g. :
gnvm version           :Print local  gnvm version information.
gnvm version -r        :Print remote gnvm latest version.
gnvm version -r -d     :Print remote CHANGELOG.
`,
	Run: func(cmd *cobra.Command, args []string) {
		if len(args) > 0 {
			P(WARING, "'%v' no parameter, please check your input. See '%v'.\n", "gnvm version", "gnvm help version")
		}
		nodehandle.Version(remote, detail)
	},
}

// sub cmd
var installCmd = &cobra.Command{
	Use:   "install",
	Short: "Install any Node.js version",
	Long: `Install any Node.js version e.g.
gnvm install latest                  :Download latest Node.js version from .gnvmrc registry.
gnvm install x.xx.xx y.yy.yy         :Multiple Node.js version download.
gnvm install x.xx.xx-x86             :Assign arch  version, suffix include: x86 and x64.
gnvm install 1.xx.xx                 :Assign io.js version.
gnvm install x.xx.xx --global        :Download and auto invoke 'gnvm use x.xx.xx'.
gnvm install npm                     :Not logger support command, please usage 'gnvm npm x.xx.xx'. See 'gnvm help npm'.
`,