
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
grunt-elevator
Advanced tools
Automatically elevate your grunt script's UAC privileges in windows
Automatically elevate your grunt script's UAC privileges in windows.
$ npm install --save grunt-elevator
// tasks/elevate.js
module.exports = function (grunt) {
require("grunt-elevator")(grunt, {
env: {
//We need to copy these variables to the elevated process.
names: ["HOME", "PATH", "SSH_AUTH_SOCK", "SSH_AGENT_PID"],
tmp: "c:\\temp\\elevatedEnv.tmp", // optional - defaults to working directory
cb: function (name, value) {
if (name == "HOME" && process.env.HOMESHARE) {
//We substitute HOME with HOMESHARE as the elevated process cannot access U:\
return process.env.HOMESHARE;
}
else if ((name == "SSH_AUTH_SOCK" || name == "SSH_AGENT_PID") && !value) {
//If the ssh-agent is not running then issue a warning.
grunt.log.writeln(("You have not set " + name + ". This could cause you to be banned from git!").yellow.bold);
}
}
},
triggers: [
/activate/,
/deactivate/
],
/* Set this to true if you need to get grunt-elevator working with grunt extensions
that hook into grunt.log.header e.g. grunt-timer. Otherwise leave it false or unset (the default)
*/
writeHeader: true
});
};
MIT © Ciaran Jessup
FAQs
Automatically elevate your grunt script's UAC privileges in windows
We found that grunt-elevator demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.