offwatch 0.5.14 → 0.5.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/offwatch.js +1 -1
- package/lib/downloader.js +4 -0
- package/package.json +1 -1
package/bin/offwatch.js
CHANGED
|
@@ -9,4 +9,4 @@ const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
|
9
9
|
const binPath = await loadCLIBinPath(__dirname);
|
|
10
10
|
|
|
11
11
|
// Run the downloaded CLI binary
|
|
12
|
-
spawn("node", [binPath], { stdio: "inherit" });
|
|
12
|
+
spawn("node", [binPath, ...process.argv.slice(2)], { stdio: "inherit" });
|
package/lib/downloader.js
CHANGED
|
@@ -90,6 +90,10 @@ const downloadRelease = async (versionDir) => {
|
|
|
90
90
|
}));
|
|
91
91
|
fs.unlinkSync(tempPath);
|
|
92
92
|
}
|
|
93
|
+
|
|
94
|
+
// Copy package.json to bin directory so bundled code can find it
|
|
95
|
+
const binDir = path.join(versionDir, "..");
|
|
96
|
+
fs.copyFileSync(__dirname + "/../package.json", path.join(binDir, "package.json"));
|
|
93
97
|
};
|
|
94
98
|
|
|
95
99
|
export const loadCLIBinPath = async (cwd) => {
|