Skip to content

Commit daa30c1

Browse files
authored
fix: add dotenv to global types (#1052)
1 parent dfe43fc commit daa30c1

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/core.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -331,8 +331,7 @@ export class ProcessPromise extends Promise<ProcessOutput> {
331331
if (stdout.length && !stdout[stdout.length - 1]!.toString().endsWith('\n')) c.on.stdout!(EOL, c)
332332
if (stderr.length && !stderr[stderr.length - 1]!.toString().endsWith('\n')) c.on.stderr!(EOL, c)
333333

334-
const output = new ProcessOutput(dto)
335-
self._output = output
334+
const output = self._output = new ProcessOutput(dto)
336335

337336
if (error || status !== 0 && !self.isNothrow()) {
338337
self._reject(output)

src/globals.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,19 @@ declare global {
2121
type ProcessOutput = _.ProcessOutput
2222
var ProcessPromise: typeof _.ProcessPromise
2323
var ProcessOutput: typeof _.ProcessOutput
24-
var log: typeof _.log
2524
var $: typeof _.$
2625
var argv: typeof _.argv
2726
var cd: typeof _.cd
2827
var chalk: typeof _.chalk
2928
var defaults: typeof _.defaults
29+
var dotenv: typeof _.dotenv
3030
var echo: typeof _.echo
3131
var expBackoff: typeof _.expBackoff
3232
var fs: typeof _.fs
3333
var glob: typeof _.glob
3434
var globby: typeof _.globby
3535
var kill: typeof _.kill
36+
var log: typeof _.log
3637
var minimist: typeof _.minimist
3738
var nothrow: typeof _.nothrow
3839
var os: typeof _.os
@@ -42,6 +43,7 @@ declare global {
4243
var quiet: typeof _.quiet
4344
var quote: typeof _.quote
4445
var quotePowerShell: typeof _.quotePowerShell
46+
var resolveDefaults: typeof _.resolveDefaults
4547
var retry: typeof _.retry
4648
var sleep: typeof _.sleep
4749
var spinner: typeof _.spinner
@@ -55,6 +57,8 @@ declare global {
5557
var usePowerShell: typeof _.usePowerShell
5658
var usePwsh: typeof _.usePwsh
5759
var useBash: typeof _.useBash
60+
var version: typeof _.version
61+
var VERSION: typeof _.VERSION
5862
var which: typeof _.which
5963
var within: typeof _.within
6064
var YAML: typeof _.YAML

0 commit comments

Comments
 (0)