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

Provide more information on pdsadmin error #50

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Sigafoos
Copy link

When I was getting my test PDS set up I was confusing "you provided an invalid command" with "the resource on your PDS was not found". The error message was there, but my changes make it more clear to me. If you disagree feel free to close this!

It will now provide this help message:

bash pdsadmin.sh accdsddsd
curl: (22) The requested URL returned error: 404
ERROR: command 'pdsadmin.sh accdsddsd' not found
Run 'pdsadmin.sh help' for a list of commands

(with pdsadmin.sh being replaced by pdsadmin when run on a server, since it uses $0)

@@ -20,7 +20,8 @@ SCRIPT_URL="${PDSADMIN_BASE_URL}/${COMMAND}.sh"
SCRIPT_FILE="$(mktemp /tmp/pdsadmin.${COMMAND}.XXXXXX)"

if ! curl --fail --silent --show-error --location --output "${SCRIPT_FILE}" "${SCRIPT_URL}"; then
echo "ERROR: ${COMMAND} not found"
echo "ERROR: command '$0 ${COMMAND}' not found"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
echo "ERROR: command '$0 ${COMMAND}' not found"
echo "ERROR: command '${COMMAND}' not found"

might also work

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

1 participant