savant-code 0.0.10 → 0.0.11
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/launcher.js +14 -0
- package/package.json +1 -1
package/launcher.js
CHANGED
|
@@ -840,6 +840,20 @@ function createLauncher(productConfig) {
|
|
|
840
840
|
}
|
|
841
841
|
}
|
|
842
842
|
|
|
843
|
+
// Move env.json next to the binary. The binary loads this at startup to
|
|
844
|
+
// determine its runtime environment, so it must live beside the exe.
|
|
845
|
+
const tempEnvJsonPath = path.join(
|
|
846
|
+
CONFIG.tempDownloadDir,
|
|
847
|
+
'env.json',
|
|
848
|
+
)
|
|
849
|
+
if (fs.existsSync(tempEnvJsonPath)) {
|
|
850
|
+
const targetEnvJsonPath = path.join(
|
|
851
|
+
path.dirname(CONFIG.binaryPath),
|
|
852
|
+
'env.json',
|
|
853
|
+
)
|
|
854
|
+
replaceFileWithRollback(tempEnvJsonPath, targetEnvJsonPath, replacements)
|
|
855
|
+
}
|
|
856
|
+
|
|
843
857
|
replaceFileWithRollback(
|
|
844
858
|
metadataTempPath,
|
|
845
859
|
CONFIG.metadataPath,
|