Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enclose shell variables with double quotes #142

Merged
merged 1 commit into from
May 20, 2024

Conversation

kyanny
Copy link
Collaborator

@kyanny kyanny commented May 20, 2024

@gm3dmo

To be shellcheck compliant and to prevent python3 configure.sh from halting with error: argument --ARGUMENT-NAME: expected one argument.

Before

❯ ./dotcom-configure.sh the-power-dotcom.skeleton
the-power-dotcom.skeleton: line 12: syntax error near unexpected token `newline'
the-power-dotcom.skeleton: line 12: `enterprise_name=<your enterprise name>'
usage: configure.py [-h] [-o ORG] [-b BASE_BRANCH] [-d CONFIGURE_GITHUB_APP] [-a APP_ID] [-i INSTALLATION_ID] [-e CLIENT_ID] [--app-client-secret APP_CLIENT_SECRET] [-u ADMIN_USER] [--admin-password ADMIN_PASSWORD] [--mgmt-password MGMT_PASSWORD]
                    [--mgmt-port MGMT_PORT] [-w WEBHOOK_URL] [--x-client-id X_CLIENT_ID] [--x-client-secret X_CLIENT_SECRET] [--number-of-users NUMBER_OF_USERS_TO_CREATE_ON_GHES] [--runner-version RUNNER_VERSION] [--runner-os RUNNER_OS]
                    [--runner-platform RUNNER_PLATFORM] [-c DOTCOM_CONFIG] [-r REPO_NAME] [-n HOSTNAME] [-t TOKEN] [-l LOGLEVEL] [-p PRIMER] [--team-name TEAM_NAME] [--private-pem-file PRIVATE_PEM_FILE] [--number-of-orgs NUMBER_OF_ORGS]
                    [--number-of-repos NUMBER_OF_REPOS] [--number-of-teams NUMBER_OF_TEAMS] [--number-of-branches NUMBER_OF_BRANCHES] [--team-members TEAM_MEMBERS] [--team-admin TEAM_ADMIN] [--default-committer DEFAULT_COMMITTER] [--allow-auto-merge ALLOW_AUTO_MERGE]
                    [--delete-branch-on-merge DELETE_BRANCH_ON_MERGE] [--enterprise-name ENTERPRISE_NAME] [--pr-approver-token PR_APPROVER_TOKEN] [--pr-approver-name PR_APPROVER_NAME] [--preferred_client PREFERRED_CLIENT] [--custom-curl-flags CURL_CUSTOM_FLAGS]
                    [--preferred_browser PREFERRED_BROWSER] [--preferred_browser_mode PREFERRED_BROWSER_MODE] [--chrome-profile CHROME_PROFILE] [--default-repo-visibility DEFAULT_REPO_VISIBILITY] [--github-api-version GITHUB_API_VERSION]
                    [--http-protocol HTTP_PROTOCOL]
configure.py: error: argument --enterprise-name: expected one argument

After

It falls back to the interactive interface. Just like python3 configure.py

❯ ./dotcom-configure.sh the-power-dotcom.skeleton
the-power-dotcom.skeleton: line 12: syntax error near unexpected token `newline'
the-power-dotcom.skeleton: line 12: `enterprise_name=<your enterprise name>'
GitHub hostname = api.github.com
Enter Personal Access Token:

To be shellcheck compliant and to prevent `python3 configure.sh` from halting with `error: argument --ARGUMENT-NAME: expected one argument`.
@gm3dmo gm3dmo merged commit 4b58c57 into gm3dmo:main May 20, 2024
4 of 5 checks passed
@kyanny kyanny deleted the kyanny-dotcom-configure branch May 21, 2024 01:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants