Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

grunt-elevator

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-elevator

Automatically elevate your grunt script's UAC privileges in windows

  • 2.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

grunt-elevator Build Status

Automatically elevate your grunt script's UAC privileges in windows.

Install

$ npm install --save grunt-elevator

Usage

// 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 
  });
};

License

MIT © Ciaran Jessup

Keywords

FAQs

Package last updated on 12 Nov 2019

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc