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

Avoid annoying error when alias has a leading slash #3236

Merged
merged 1 commit into from May 27, 2020

Conversation

vadmeste
Copy link
Member

mc config host list
mc config host add
mc config host remove
mc admin prometheus generate

The above mc commands generate an annoying error message complaining
about the leading slash in the alias argument.

Although alias does not support any slash or backslash, we allow the
user to enter it for convenience and the code will just clean it before
using it.

Copy link
Member

@harshavardhana harshavardhana left a comment

Choose a reason for hiding this comment

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

This would make it impossible to use /data because data might be an alias?

@harshavardhana
Copy link
Member

If there is a beginning / we can assume that its not an alias and the intention is to access the local filesystem @vadmeste

@vadmeste
Copy link
Member Author

This would make it impossible to use /data because data might be an alias?

The change only relaxes the check on the alias in the following commands:

mc config host list
mc config host add
mc config host remove
mc admin prometheus generate

where the argument is always an alias and could never be a file system path

@harshavardhana
Copy link
Member

This would make it impossible to use /data because data might be an alias?

The change only relaxes the check on the alias in the following commands:

mc config host list
mc config host add
mc config host remove
mc admin prometheus generate

where the argument is always an alias and could never be a file system path

Understood @vadmeste

Copy link
Member

@harshavardhana harshavardhana left a comment

Choose a reason for hiding this comment

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

LGTM

@kannappanr kannappanr merged commit ea03e61 into minio:master May 27, 2020
```
mc config host list
mc config host add
mc config host remove
mc admin prometheus generate
```

The above mc commands generate an annoying error message complaining
about the leading slash in the alias argument.

Although alias does not support any slash or backslash, we allow the
user to enter it for convenience and the code will just clean it before
using it.
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

3 participants