Skip to content

Emit an error upon failing to create a temp dir instead of panicking #28430

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

Merged
merged 1 commit into from
Sep 19, 2015
Merged

Emit an error upon failing to create a temp dir instead of panicking #28430

merged 1 commit into from
Sep 19, 2015

Conversation

apasel422
Copy link
Contributor

Emit an error upon failing to create a temp dir instead of panicking

Closes #14698.

@rust-highfive
Copy link
Contributor

r? @pnkfelix

(rust_highfive has picked a reviewer for you, use r? to override)

@huonw
Copy link
Member

huonw commented Sep 16, 2015

(It'd be great if the commit message described what it was doing, instead of being entirely dependent on the issue.)

@apasel422 apasel422 changed the title Fix #14698 Emit an error upon failing to create a temp dir instead of unwrapping Sep 16, 2015
@apasel422 apasel422 changed the title Emit an error upon failing to create a temp dir instead of unwrapping Emit an error upon failing to create a temp dir instead of panicking Sep 16, 2015
@pnkfelix
Copy link
Member

I'll take the liberty of copying the PR title into the PR description since it seems like our homu instance does not have the fix for barosl/homu#65

-include ../tools.mk

all:
TMPDIR=fake $(RUSTC) foo.rs 2>&1 | grep "couldn't create a temp dir:"
Copy link
Member

Choose a reason for hiding this comment

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

One might argue that this is not actually testing the real meat of the PR -- to do that I'd say you would want to grep for fake too.

but that is such a minor nit that I am not going to hold up this PR on it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The error message doesn't necessarily include the name of the temp dir itself.

@pnkfelix
Copy link
Member

@bors r+ 189595d rollup

@bors
Copy link
Collaborator

bors commented Sep 16, 2015

⌛ Testing commit 189595d with merge eb2b792...

@bors
Copy link
Collaborator

bors commented Sep 16, 2015

💔 Test failed - auto-win-gnu-64-nopt-t

@apasel422
Copy link
Contributor Author

I'm not sure what to make of the error from auto-win-gnu-64-nopt-t.

@apasel422
Copy link
Contributor Author

Actually, this is probably a result of Windows using {TMP, TEMP, USERPROFILE} instead of TMPDIR. Let me investigate.

@apasel422
Copy link
Contributor Author

r? @pnkfelix This should work on Windows now.

@apasel422
Copy link
Contributor Author

Can someone have @bors retry this?

@alexcrichton
Copy link
Member

@bors: r+ 7352722

steveklabnik added a commit to steveklabnik/rust that referenced this pull request Sep 19, 2015
Emit an error upon failing to create a temp dir instead of panicking

Closes rust-lang#14698.
bors added a commit that referenced this pull request Sep 19, 2015
@bors bors merged commit 7352722 into rust-lang:master Sep 19, 2015
@apasel422 apasel422 deleted the issue-14698 branch September 19, 2015 21:20
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.

6 participants