Version cmd

This commit is contained in:
AlexSSD7 2023-08-30 14:53:22 +01:00
commit 8f62831b9d
3 changed files with 21 additions and 2 deletions

View file

@ -33,8 +33,6 @@ var vmSSHSetupTimeoutFlag uint32
var vmOSUpTimeoutFlag uint32
var dataDirFlag string
// TODO: Version command.
func init() {
slog.SetDefault(slog.New(slog.NewTextHandler(os.Stderr, nil)))
@ -43,6 +41,7 @@ func init() {
rootCmd.AddCommand(shellCmd)
rootCmd.AddCommand(cleanCmd)
rootCmd.AddCommand(buildCmd)
rootCmd.AddCommand(versionCmd)
rootCmd.PersistentFlags().BoolVar(&vmDebugFlag, "vm-debug", false, "Enables the VM debug mode. This will open an accessible VM monitor. You can log in with root user and no password.")
rootCmd.PersistentFlags().BoolVar(&unrestrictedNetworkingFlag, "vm-unrestricted-networking", false, "Enables unrestricted networking. This will allow the VM to connect to the internet.")