src/Pure/System/nodejs.scala
changeset 83138 c66d77fb729e
parent 83124 921ca143fd94
child 83142 9316a0075326
equal deleted inserted replaced
83136:b6e117b5d0f0 83138:c66d77fb729e
    66     def path_setup: String =
    66     def path_setup: String =
    67       "export PATH=" + Bash.string(platform_context.standard_path(bin_dir)) + """:"$PATH""""
    67       "export PATH=" + Bash.string(platform_context.standard_path(bin_dir)) + """:"$PATH""""
    68 
    68 
    69     def install(name: String, production: Boolean = false): Unit = {
    69     def install(name: String, production: Boolean = false): Unit = {
    70       progress.echo("Installing " + name + " ...")
    70       progress.echo("Installing " + name + " ...")
    71       platform_context.execute(path,
    71       platform_context.bash(
    72         Library.make_lines(
    72         Library.make_lines(
       
    73           "set -e",
    73           path_setup,
    74           path_setup,
    74           "npm install --global " + if_proper(production, "--production ") + Bash.string(name)
    75           "npm install --global " + if_proper(production, "--production ") + Bash.string(name)
    75         )).check
    76         ), cwd = path).check
    76     }
    77     }
    77   }
    78   }
    78 
    79 
    79 
    80 
    80 
    81