Skip to content

Commit

Permalink
Issue #2163 Fix minishift ip command in case instance doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
praveenkumar authored and gbraad committed Sep 19, 2018
1 parent febc3a9 commit e3e4a16
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions cmd/minishift/cmd/ip.go
Expand Up @@ -42,6 +42,8 @@ var ipCmd = &cobra.Command{
api := libmachine.NewClient(state.InstanceDirs.Home, state.InstanceDirs.Certs)
defer api.Close()

cmdUtil.ExitIfUndefined(api, constants.MachineName)

if configureAsStatic && configureAsDynamic {
atexit.ExitWithMessage(1, "Invalid options specified")
}
Expand Down
2 changes: 1 addition & 1 deletion test/integration/features/cmd-profile.feature
Expand Up @@ -164,7 +164,7 @@ Feature: Profile commands
When executing "minishift delete --force" succeeds
Then Minishift should have state "Does Not Exist"
When executing "minishift ip"
Then exitcode should equal "1"
Then exitcode should equal "0"

Scenario: As user, I cannot create profile when used along with profile <subcommand> --profile name
Given Minishift has state "Does Not Exist"
Expand Down

0 comments on commit e3e4a16

Please sign in to comment.