snyk 1.788.0 → 1.789.0

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.
@@ -18788,13 +18788,14 @@ const sub_process_1 = __webpack_require__(28219);
18788
18788
  const path = __webpack_require__(85622);
18789
18789
  const os_1 = __webpack_require__(12087);
18790
18790
  const errors_1 = __webpack_require__(38133);
18791
+ const fs = __webpack_require__(35747);
18792
+ const tmp = __webpack_require__(21086);
18791
18793
  function getGradleCommandArgs(targetPath, initScript, confAttrs) {
18792
- const gradleArgs = [
18793
- 'printClasspath',
18794
- '-I',
18795
- path.join(__dirname, ...'../bin/init.gradle'.split('/')),
18796
- '-q',
18797
- ];
18794
+ // For binary releases, the original file would be in the binary build and inaccesible
18795
+ const originalPath = path.join(__dirname, ...'../bin/init.gradle'.split('/'));
18796
+ const tmpFilePath = tmp.fileSync().name;
18797
+ fs.copyFileSync(originalPath, tmpFilePath);
18798
+ const gradleArgs = ['printClasspath', '-I', tmpFilePath, '-q'];
18798
18799
  if (targetPath) {
18799
18800
  gradleArgs.push('-p', targetPath);
18800
18801
  }