Skip to content

Commit

Permalink
vm: fix hostname regression for other profiles. (#853)
Browse files Browse the repository at this point in the history
  • Loading branch information
abiosoft committed Nov 13, 2023
1 parent dfd8f81 commit fa1bc24
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cmd/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ var startCmdArgs struct {
func init() {
runtimes := strings.Join(environment.ContainerRuntimes(), ", ")
defaultArch := string(environment.HostArch())
defaultHostname := config.CurrentProfile().ID

mounts := strings.Join([]string{defaultMountTypeQEMU, "9p", "virtiofs"}, ", ")
types := strings.Join([]string{defaultVMType, "vz"}, ", ")
Expand All @@ -154,7 +153,7 @@ func init() {
startCmd.Flags().IntVarP(&startCmdArgs.Disk, "disk", "d", defaultDisk, "disk size in GiB")
startCmd.Flags().StringVarP(&startCmdArgs.Arch, "arch", "a", defaultArch, "architecture (aarch64, x86_64)")
startCmd.Flags().BoolVarP(&startCmdArgs.Flags.Foreground, "foreground", "f", false, "Keep colima in the foreground")
startCmd.Flags().StringVar(&startCmdArgs.Hostname, "hostname", defaultHostname, "custom hostname for the virtual machine")
startCmd.Flags().StringVar(&startCmdArgs.Hostname, "hostname", "", "custom hostname for the virtual machine")

// network
if util.MacOS() {
Expand Down

0 comments on commit fa1bc24

Please sign in to comment.