Skip to content

Commit

Permalink
Fixed paths on linux
Browse files Browse the repository at this point in the history
  • Loading branch information
desertkun committed Jan 25, 2019
1 parent 1b808b8 commit 85cf7e4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
4 changes: 3 additions & 1 deletion src/async.ts
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,9 @@ export function execFileReadIn(command: string, args:Array<string>, cwd: string,

process.stderr.on("data", (data) =>
{
handler.erorr += data.toString();
const e = data.toString();
console.log(e);
handler.erorr += e;
});

process.stderr.on("data", (data) =>
Expand Down
15 changes: 9 additions & 6 deletions src/puppet/ruby.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,9 @@ export class Ruby
Object.assign(env, env_);

env["SSL_CERT_FILE"] = path.join(Ruby.RubyScriptsPath(), "cacert.pem");
env["GEM_PATH"] = '"' + gemPath + '"' + path.delimiter + '"' + gemBundlerPath + '"';
env["PATH"] = '"' + ruby.path + '"' + path.delimiter + process.env["PATH"];
env["GEM_PATH"] = gemPath + path.delimiter + gemBundlerPath;
env["GEM_HOME"] = gemPath;
env["PATH"] = ruby.path + path.delimiter + process.env["PATH"];

console.log("calling " + ruby.rubyPath + " " + argsTotal.join(" "));
return await async.execFileReadIn('"' + ruby.rubyPath + '"', argsTotal, cwd, env, cb);
Expand Down Expand Up @@ -98,8 +99,9 @@ export class Ruby
Object.assign(env, env_);

env["SSL_CERT_FILE"] = path.join(Ruby.RubyScriptsPath(), "cacert.pem");
env["GEM_PATH"] = '"' + gemPath + '"' + path.delimiter + '"' + gemBundlerPath + '"';
env["PATH"] = '"' + ruby.path + '"' + path.delimiter + process.env["PATH"];
env["GEM_PATH"] = gemPath + path.delimiter + gemBundlerPath;
env["GEM_HOME"] = gemPath;
env["PATH"] = ruby.path + path.delimiter + process.env["PATH"];

console.log("calling " + ruby.rubyPath + " " + argsTotal.join(" "));
const result = await async.execFileReadIn('"' + ruby.rubyPath + '"', argsTotal, cwd, env, cb);
Expand Down Expand Up @@ -129,8 +131,9 @@ export class Ruby
Object.assign(env, env_);

env["SSL_CERT_FILE"] = path.join(Ruby.RubyScriptsPath(), "cacert.pem");
env["GEM_PATH"] = '"' + gemPath + '"' + path.delimiter + '"' + gemBundlerPath + '"';
env["PATH"] = '"' + ruby.path + '"' + path.delimiter + process.env["PATH"];
env["GEM_PATH"] = gemPath + path.delimiter + gemBundlerPath + '"';
env["GEM_HOME"] = gemPath;
env["PATH"] = ruby.path + path.delimiter + process.env["PATH"];

console.log("path = " + env["PATH"]);
console.log("getm path = " + gemPath);
Expand Down

0 comments on commit 85cf7e4

Please sign in to comment.