Przeglądaj źródła

fixed `jlpm check --integrity` fail by removing `--ignore-scripts` flag

telamonian 5 lat temu
rodzic
commit
a2ba20eb70
2 zmienionych plików z 13 dodań i 15 usunięć
  1. 1 2
      buildutils/src/ensure-repo.ts
  2. 12 13
      scripts/ensure-buildutils.js

+ 1 - 2
buildutils/src/ensure-repo.ts

@@ -397,8 +397,7 @@ export async function ensureIntegrity(): Promise<boolean> {
       );
       process.exit(1);
     }
-    // skip redundant rebuild of buildutils with --ignore-scripts
-    utils.run('jlpm install --ignore-scripts');
+    utils.run('jlpm install');
     console.log('\n\nMade integrity changes!');
     console.log('Please commit the changes by running:');
     console.log('git commit -a -m "Package integrity updates"');

+ 12 - 13
scripts/ensure-buildutils.js

@@ -2,6 +2,8 @@
 | Copyright (c) Jupyter Development Team.
 | Distributed under the terms of the Modified BSD License.
 |----------------------------------------------------------------------------*/
+// uncomment to time script
+// var start = new Date();
 
 var fs = require('fs-extra');
 var glob = require('glob');
@@ -49,17 +51,14 @@ if (fs.existsSync(path.join(basePath, 'lib'))) {
 }
 
 if (!current) {
-  try {
-    childProcess.execSync('jlpm run build', {
-      stdio: [0, 1, 2],
-      cwd: path.resolve('./buildutils')
-    });
-  } catch (e) {
-    // fallback to `npm` during `pip install -e .` before jlpm is installed.
-    // Using `npm` can cause `jlpm check --integrity` to fail
-    childProcess.execSync('npm run build', {
-      stdio: [0, 1, 2],
-      cwd: path.resolve('./buildutils')
-    });
-  }
+  // This must be "npm" because it is run during `pip install -e .` before
+  // jlpm is installed.
+  childProcess.execSync('npm run build', {
+    stdio: [0, 1, 2],
+    cwd: path.resolve('./buildutils')
+  });
 }
+
+// uncomment to time script
+// var end = new Date() - start;
+// console.info('Execution time: %dms', end);