Skip to content

Conversation

@BridgeAR
Copy link
Member

This enables the no-unsafe-finally eslint rule to make sure we
have a proper control flow in try / catch.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

tools

This enables the `no-unsafe-finally` eslint rule to make sure we have a proper control flow in try / catch.
@nodejs-github-botnodejs-github-bot added the tools Issues and PRs related to the tools directory. label Feb 13, 2018
constoutput=execSync(`${whoamiPath} /priv`,{timout: 1000});
if(!output.includes('SeCreateSymbolicLinkPrivilege')){
returnfalse;
}
Copy link
Member

Choose a reason for hiding this comment

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

Can be simplified to just this, I think?

returnoutput.includes('SeCreateSymbolicLinkPrivilege');

And then you don't need the return true a few lines below.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Yepp, absolutely

@BridgeAR
Copy link
MemberAuthor

@BridgeARBridgeAR added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Feb 13, 2018
@BridgeARBridgeAR added the fast-track PRs that do not need to wait for 48 hours to land. label Feb 13, 2018
@BridgeAR
Copy link
MemberAuthor

Landed in 4d3c3f0

BridgeAR added a commit to BridgeAR/node that referenced this pull request Feb 16, 2018
This enables the `no-unsafe-finally` eslint rule to make sure we have a proper control flow in try / catch. PR-URL: nodejs#18745 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]>
@MylesBorins
Copy link
Contributor

There is another unsafe finally in v9.x, would you be willing to manually backport and fix it so we can review?

@BridgeAR
Copy link
MemberAuthor

Backported in #19244 that removed the other unsafe finally as well.

BridgeAR added a commit to BridgeAR/node that referenced this pull request Mar 21, 2018
This enables the `no-unsafe-finally` eslint rule to make sure we have a proper control flow in try / catch. PR-URL: nodejs#18745 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]>
MylesBorins pushed a commit that referenced this pull request Mar 21, 2018
This enables the `no-unsafe-finally` eslint rule to make sure we have a proper control flow in try / catch. Backport-PR-URL: #19244 PR-URL: #18745 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]>
@targostargos mentioned this pull request Mar 21, 2018
MayaLekova pushed a commit to MayaLekova/node that referenced this pull request May 8, 2018
This enables the `no-unsafe-finally` eslint rule to make sure we have a proper control flow in try / catch. PR-URL: nodejs#18745 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]>
@MylesBorins
Copy link
Contributor

Backport requested for 8.x in #19244

@BridgeARBridgeAR deleted the no-unsafe-finally branch April 1, 2019 23:38
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.toolsIssues and PRs related to the tools directory.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants

@BridgeAR@MylesBorins@bnoordhuis@jasnell@lpinca@cjihrig@mmarchini@nodejs-github-bot