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

mktemp: error on empty --suffix in some situations #3599

Merged
merged 1 commit into from
Jun 7, 2022

Conversation

jfinkels
Copy link
Collaborator

@jfinkels jfinkels commented Jun 6, 2022

Make mktemp exit with an error if the --suffix option is the empty
string and the template argument does not end in an "X". Previously,
the program succeeded.

Before this commit,

$ mktemp --suffix= aXXXb
apBEb

After this commit,

$ mktemp --suffix= aXXXb
mktemp: with --suffix, template 'aXXXb' must end in X

This causes the test case suffix7f to pass in the file tests/misc/mktemp.pl in the GNU test suite.

Make `mktemp` exit with an error if the `--suffix` option is the empty
string and the template argument does not end in an "X". Previously,
the program succeeded.

Before this commit,

    $ mktemp --suffix= aXXXb
    apBEb

After this commit,

    $ mktemp --suffix= aXXXb
    mktemp: with --suffix, template 'aXXXb' must end in X
@jfinkels jfinkels force-pushed the mktemp-suffix-empty-string branch from b22a117 to 6da070c Compare June 7, 2022 01:26
@jfinkels
Copy link
Collaborator Author

jfinkels commented Jun 7, 2022

I updated this pull request with a simpler change that resolves GNU test case suffix7d as well.

@sylvestre sylvestre merged commit 5f999e9 into uutils:main Jun 7, 2022
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.

2 participants