netlify-cli 8.9.7 → 8.10.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.
package/bin/run CHANGED
@@ -1,5 +1,4 @@
1
1
  #!/usr/bin/env node
2
- /* eslint-disable promise/prefer-await-to-then,promise/prefer-await-to-callbacks,eslint-comments/disable-enable-pair */
3
2
  const process = require('process')
4
3
 
5
4
  const updateNotifier = require('update-notifier')
@@ -18,23 +17,13 @@ if (require.main === module) {
18
17
  pkg,
19
18
  updateCheckInterval: UPDATE_CHECK_INTERVAL,
20
19
  }).notify()
21
- } catch (error) {
20
+ } catch (error_) {
22
21
  console.log('Error checking for updates:')
23
- console.log(error)
22
+ console.log(error_)
24
23
  }
25
24
 
26
- /** @type {Error} */
27
- let caughtError
28
-
29
25
  const program = createMainCommand()
30
26
 
31
- program.parseAsync(process.argv).catch((error) => {
32
- caughtError = error
33
- })
34
-
35
- // long running commands like dev server cannot be caught by a post action hook
36
- // they are running on the main command
37
- process.on('exit', () => {
38
- program.onEnd(caughtError)
39
- })
27
+ // eslint-disable-next-line promise/prefer-await-to-then
28
+ program.parseAsync(process.argv).catch((error_) => program.onEnd(error_))
40
29
  }