Skip to content

tools: enable no-unsafe-finally #18745

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

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ rules:
}]
no-tabs: error
no-trailing-spaces: error
no-unsafe-finally: error
object-curly-spacing: [error, always]
one-var-declaration-per-line: error
operator-linebreak: [error, after]
Expand Down
14 changes: 3 additions & 11 deletions test/common/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -504,21 +504,13 @@ exports.canCreateSymLink = function() {
const whoamiPath = path.join(process.env['SystemRoot'],
'System32', 'whoami.exe');

let err = false;
let output = '';

try {
output = execSync(`${whoamiPath} /priv`, { timout: 1000 });
const output = execSync(`${whoamiPath} /priv`, { timout: 1000 });
return output.includes('SeCreateSymbolicLinkPrivilege');
} catch (e) {
err = true;
} finally {
if (err || !output.includes('SeCreateSymbolicLinkPrivilege')) {
return false;
}
return false;
}
}

return true;
};

exports.getCallSite = function getCallSite(top) {
Expand Down