Skip to content

Dont ask for OVERWRITE if the filepath does not exist #428

@slm0n87

Description

@slm0n87

Doing:

➜  ~ rm .kube/custom-contexts/inttestv128.yaml
➜  ~ ll .kube/custom-contexts/inttestv128.yaml
ls: .kube/custom-contexts/inttestv128.yaml: No such file or directory
➜  ~ s ske kubeconfig create inttestv128 --filepath ~/.kube/custom-contexts/inttestv128.yaml
Are you sure you want to create a kubeconfig for SKE cluster "inttestv128"? This will OVERWRITE your current kubeconfig file, if it exists. [y/N] y
Created kubeconfig file for cluster inttestv128 in "/Users/stier/.kube/custom-contexts/inttestv128.yaml", with expiration date 2024-07-26T08:08:00Z (UTC)
➜  ~

The cli gives a warning to overwrite the config file if it exists and have a default: No.
This is very nice, but absolut unnecessary if the file des not exist.

Expected behaviour:
Just write the file and avoid unnecessary user interaction.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions