Skip to content

Commit ffdfd38

Browse files
committed
更新[EnvJs]: 修复逻辑错误
1 parent 5197ff1 commit ffdfd38

4 files changed

Lines changed: 154 additions & 3 deletions

File tree

Env.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,8 @@ function Env(name, opts) {
220220
if (!err && resp) {
221221
resp.body = body
222222
resp.statusCode = resp.status
223-
callback(err, resp, body)
224223
}
224+
callback(err, resp, body)
225225
})
226226
} else if (this.isQuanX()) {
227227
opts.method = 'POST'
@@ -308,7 +308,7 @@ function Env(name, opts) {
308308
return new Promise((resolve) => setTimeout(resolve, time))
309309
}
310310

311-
done(val = null) {
311+
done(val = {}) {
312312
const endTime = new Date().getTime()
313313
const costTime = (endTime - this.startTime) / 1000
314314
this.log('', `🔔${this.name}, 结束! 🕛 ${costTime} 秒`)

Env.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,16 @@
22
"name": "chavy_scripts",
33
"version": "1.0.0",
44
"main": "Env.js",
5+
"scripts": {
6+
"dev": "http-server ."
7+
},
58
"repository": "https://github.com/chavyleung/scripts.git",
69
"author": "Chavy <chavyleung@gmail.com>",
710
"license": "MIT",
811
"dependencies": {
912
"crypto-js": "^4.0.0",
1013
"got": "^11.3.0",
14+
"http-server": "^0.12.3",
1115
"tough-cookie": "^4.0.0"
1216
}
1317
}

0 commit comments

Comments
 (0)