Skip to content

Provide more information on pdsadmin error#50

Open
Sigafoos wants to merge 1 commit intobluesky-social:mainfrom
Sigafoos:pdsadmin_help
Open

Provide more information on pdsadmin error#50
Sigafoos wants to merge 1 commit intobluesky-social:mainfrom
Sigafoos:pdsadmin_help

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)


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.

1 participant