We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b01581f commit 18c286cCopy full SHA for 18c286c
src/plugin.js
@@ -67,6 +67,8 @@ export async function spawnServer(opts, killOnExit = true) {
67
const tmpdir = os.tmpdir();
68
const filepath = path.join(tmpdir, `prettier-ruby-parser-${process.pid}.txt`);
69
70
+ const currentDir = opts.filepath || process.cwd();
71
+
72
const server = spawn(
73
opts.rubyExecutablePath || "ruby",
74
[
@@ -75,7 +77,7 @@ export async function spawnServer(opts, killOnExit = true) {
75
77
filepath
76
78
],
79
{
- cwd: path.dirname(opts.filepath),
80
+ cwd: path.dirname(currentDir),
81
env: Object.assign({}, process.env, { LANG: getLang() }),
82
stdio: ["ignore", "ignore", "inherit"],
83
detached: true
0 commit comments