Skip to content

Throw terminating error in New-TemporaryFile and make it not rely on the presence of the 'TEMP' environment variable - #6182

Merged
Ilya (iSazonov) merged 9 commits into
PowerShell:masterfrom
bergmeister:new-temporaryFile_TerminatingError
Feb 22, 2018
Merged

Ilya (iSazonov) merged 9 commits into
PowerShell:masterfrom
bergmeister:new-temporaryFile_TerminatingError

Conversation

@bergmeister

@bergmeister Christoph Bergmeister (bergmeister) commented Feb 18, 2018 •

Copy link
Copy Markdown
Contributor

PR Summary

  • Fixes New-TemporaryFile should throw terminating error #4634 by throwing a terminating error as agreed
  • Makes the command not rely on the presence of the TEMP environment variable to get path to temp directory and use the .Net method Path.GetTempPath() instead
  • Catch exception more specific as given by the documentation
  • Improve existing test

PR Checklist

Note: Please mark anything not applicable to this PR NA.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Breaking-Change breaking change that may affect users

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New-TemporaryFile should throw terminating error

4 participants