Skip to content

Conversation

@targos
Copy link
Member

Currently, the test creates a file in the cwd and doesn't clean it up.
Use a temporary directory instead.

Currently, the test creates a file in the cwd and doesn't clean it up. Use a temporary directory instead.
@targostargos added the test Issues and PRs related to the tests. label Apr 4, 2019
@targostargos requested a review from BridgeARApril 4, 2019 15:34
@nodejs-github-bot
Copy link
Collaborator

Copy link
Member

@BridgeARBridgeAR left a comment

Choose a reason for hiding this comment

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

Thanks!

@BridgeAR
Copy link
Member

I would like to fast-track this. Please +1 if you're fine with that.

@BridgeARBridgeAR added the fast-track PRs that do not need to wait for 48 hours to land. label Apr 4, 2019
@nodejs-github-bot
Copy link
Collaborator

@BridgeARBridgeAR added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Apr 4, 2019
@targos
Copy link
MemberAuthor

I just pushed a fix (forgot a slash)


tmpdir.refresh();

constrequirePath=tmpdir.path+'/non-existent.json';
Copy link
Member

Choose a reason for hiding this comment

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

Nit: path.join()?

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@targos
Copy link
MemberAuthor

what am I missing with tmpdir on Windows?

@richardlau
Copy link
Member

  • "> Thrown:\n{Error: ENOENT: no such file or directory, open 'c:workspace\node-test-binary-windows\test.tmp.0\non-existent.json'\n at Object.openSync (fs.js:455:3)\n at Object.writeFileSync (fs.js:1248:35)\n errno: -4058,\n syscall: 'open',\n code: 'ENOENT',\n path:\n 'c:workspace\node-test-binary-windows\test.tmp.0\non-existent.json' }\n> "
  • '> 1\n> '

Looks like something has happened to the \ after c:. A recent regression?

@targos
Copy link
MemberAuthor

targos commented Apr 6, 2019

Thanks @richardlau I think I know what it is now. Since I'm injecting the value in a string literal, the \ acts as an escape character.

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@addaleax
Copy link
Member

Landed in 58aaf58, thanks for the PR!

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

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.fast-trackPRs that do not need to wait for 48 hours to land.testIssues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants

@targos@nodejs-github-bot@BridgeAR@richardlau@addaleax@jasnell@lpinca@cjihrig@ZYSzys