zowe / zowe-cli

Zowe CLI
Eclipse Public License 2.0
113 stars 87 forks source link

Confusing error when default profile is invalid #1062

Open t1m0thyj opened 3 years ago

t1m0thyj commented 3 years ago

The default profile "lpar2.zosmf" in this example doesn't exist:

{
    "$schema": "./zowe.schema.json",
    "profiles": {
        "lpar1": {
            "properties": {
                "host": "example1.com"
            },
            "profiles": {
                "zosmf": {
                    "type": "zosmf",
                    "properties": {
                        "port": 1443
                    }
                }
            }
        },
        "my_base": {
            "type": "base",
            "properties": {
                "rejectUnauthorized": true
            },
            "secure": [
                "user",
                "password"
            ]
        }
    },
    "defaults": {
        "zosmf": "lpar2.zosmf",
        "base": "my_base"
    },
    "plugins": []
}

Current Behavior: Zowe CLI ignores that the value of "defaults.zosmf" doesn't exist, and tries to access z/OSMF on the default port 443.

Expected Behavior: Zowe CLI should fail because the default z/OSMF profile is invalid.

github-actions[bot] commented 1 year ago

Thank you for creating a bug report. If you haven't already, please ensure you have provided steps to reproduce it and as much context as possible.