Skip to content
This repository was archived by the owner on Aug 22, 2023. It is now read-only.

Commit 8fdc599

Browse files
committed
fix: windows dirname paths
1 parent 77fd30c commit 8fdc599

File tree

4 files changed

+75
-50
lines changed

4 files changed

+75
-50
lines changed

package.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,23 @@
88
"debug": "^3.1.0"
99
},
1010
"devDependencies": {
11-
"@oclif/errors": "^1.0.2",
12-
"@oclif/parser": "^3.2.9",
13-
"@oclif/tslint": "^1.0.2",
11+
"@oclif/errors": "^1.0.3",
12+
"@oclif/parser": "^3.2.11",
13+
"@oclif/tslint": "^1.1.0",
1414
"@types/chai": "^4.1.2",
1515
"@types/globby": "^6.1.0",
1616
"@types/indent-string": "^3.0.0",
1717
"@types/mocha": "^5.0.0",
18-
"@types/node": "^9.6.0",
18+
"@types/node": "^9.6.2",
1919
"@types/wrap-ansi": "^3.0.0",
2020
"chai": "^4.1.2",
2121
"concurrently": "^3.5.1",
22-
"fancy-test": "^1.0.1",
22+
"fancy-test": "^1.0.4",
2323
"globby": "^8.0.1",
2424
"mocha": "^5.0.5",
2525
"ts-node": "^5.0.1",
2626
"tslint": "^5.9.1",
27-
"typescript": "^2.7.2"
27+
"typescript": "^2.8.1"
2828
},
2929
"engines": {
3030
"node": ">=8.0.0"

src/config.ts

+1
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ export class Config implements IConfig {
153153
this.windows = this.platform === 'win32'
154154
this.bin = this.pjson.oclif.bin || this.name
155155
this.dirname = this.pjson.oclif.dirname || this.name
156+
if (this.platform === 'win32') this.dirname = this.dirname.replace('/', '\\')
156157
this.userAgent = `${this.name}/${this.version} ${this.platform}-${this.arch} node-${process.version}`
157158
this.shell = this._shell()
158159
this.debug = this._debug()

test/config.test.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ describe('PluginConfig', () => {
4646
.add('config', () => Config.load())
4747
.end('win32', ({config}) => {
4848
expect(config).to.include({
49-
cacheDir: path.join('/my/home/localappdata/@oclif/config'),
50-
configDir: path.join('/my/home/localappdata/@oclif/config'),
51-
errlog: path.join('/my/home/localappdata/@oclif/config/error.log'),
52-
dataDir: path.join('/my/home/localappdata/@oclif/config'),
49+
cacheDir: path.join('/my/home/localappdata/@oclif\\config'),
50+
configDir: path.join('/my/home/localappdata/@oclif\\config'),
51+
errlog: path.join('/my/home/localappdata/@oclif\\config/error.log'),
52+
dataDir: path.join('/my/home/localappdata/@oclif\\config'),
5353
home: path.join('/my/home'),
5454
})
5555
})

yarn.lock

+64-40
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,28 @@
66
version "1.0.0"
77
resolved "https://registry.yarnpkg.com/@heroku/linewrap/-/linewrap-1.0.0.tgz#a9d4e99f0a3e423a899b775f5f3d6747a1ff15c6"
88

9-
"@oclif/errors@^1.0.2":
10-
version "1.0.2"
11-
resolved "https://registry.yarnpkg.com/@oclif/errors/-/errors-1.0.2.tgz#0a3f773d673a3ccd8dc26bf2e3c49580afcbe30e"
9+
"@oclif/errors@^1.0.3":
10+
version "1.0.3"
11+
resolved "https://registry.yarnpkg.com/@oclif/errors/-/errors-1.0.3.tgz#f23c024075855c7d116d041ee158f99bd51175af"
1212
dependencies:
1313
clean-stack "^1.3.0"
1414
fs-extra "^5.0.0"
1515
indent-string "^3.2.0"
1616
strip-ansi "^4.0.0"
1717
wrap-ansi "^3.0.1"
1818

19-
"@oclif/parser@^3.2.9":
20-
version "3.2.9"
21-
resolved "https://registry.yarnpkg.com/@oclif/parser/-/parser-3.2.9.tgz#76d01106971e20dfcfec5be276c4e6e9edfee9ec"
19+
"@oclif/parser@^3.2.11":
20+
version "3.2.11"
21+
resolved "https://registry.yarnpkg.com/@oclif/parser/-/parser-3.2.11.tgz#03a5fef0c45dd1badd0375ae05b476e0c27faf40"
2222
dependencies:
2323
"@heroku/linewrap" "^1.0.0"
24+
chalk "^2.3.2"
2425

25-
"@oclif/tslint@^1.0.2":
26-
version "1.0.2"
27-
resolved "https://registry.yarnpkg.com/@oclif/tslint/-/tslint-1.0.2.tgz#793d39758082f359469dba8ce5cfba041d7a7847"
26+
"@oclif/tslint@^1.1.0":
27+
version "1.1.0"
28+
resolved "https://registry.yarnpkg.com/@oclif/tslint/-/tslint-1.1.0.tgz#a2d494a61afa882a685fe5f4d866dafd18990728"
2829
dependencies:
29-
tslint-xo "^0.6.0"
30+
tslint-xo "^0.7.0"
3031

3132
"@types/chai@^4.1.2":
3233
version "4.1.2"
@@ -66,9 +67,9 @@
6667
version "9.4.5"
6768
resolved "https://registry.yarnpkg.com/@types/node/-/node-9.4.5.tgz#d2a90c634208173d1b1a0a6ba9f1df3de62edcf5"
6869

69-
"@types/node@^9.6.0":
70-
version "9.6.0"
71-
resolved "https://registry.yarnpkg.com/@types/node/-/node-9.6.0.tgz#d3480ee666df9784b1001a1872a2f6ccefb6c2d7"
70+
"@types/node@^9.6.2":
71+
version "9.6.2"
72+
resolved "https://registry.yarnpkg.com/@types/node/-/node-9.6.2.tgz#e49ac1adb458835e95ca6487bc20f916b37aff23"
7273

7374
"@types/wrap-ansi@^3.0.0":
7475
version "3.0.0"
@@ -100,6 +101,12 @@ ansi-styles@^3.2.0:
100101
dependencies:
101102
color-convert "^1.9.0"
102103

104+
ansi-styles@^3.2.1:
105+
version "3.2.1"
106+
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d"
107+
dependencies:
108+
color-convert "^1.9.0"
109+
103110
argparse@^1.0.7:
104111
version "1.0.9"
105112
resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.9.tgz#73d83bc263f86e97f8cc4f6bae1b0e90a7d22c86"
@@ -260,6 +267,14 @@ chalk@^2.3.0:
260267
escape-string-regexp "^1.0.5"
261268
supports-color "^5.2.0"
262269

270+
chalk@^2.3.2:
271+
version "2.3.2"
272+
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.2.tgz#250dc96b07491bfd601e648d66ddf5f60c7a5c65"
273+
dependencies:
274+
ansi-styles "^3.2.1"
275+
escape-string-regexp "^1.0.5"
276+
supports-color "^5.3.0"
277+
263278
check-error@^1.0.1:
264279
version "1.0.2"
265280
resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82"
@@ -384,7 +399,7 @@ dir-glob@^2.0.0:
384399
arrify "^1.0.1"
385400
path-type "^3.0.0"
386401

387-
doctrine@^0.7.2:
402+
doctrine@0.7.2:
388403
version "0.7.2"
389404
resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-0.7.2.tgz#7cb860359ba3be90e040b26b729ce4bfa654c523"
390405
dependencies:
@@ -445,12 +460,12 @@ extglob@^2.0.2:
445460
snapdragon "^0.8.1"
446461
to-regex "^3.0.1"
447462

448-
fancy-test@^1.0.1:
449-
version "1.0.1"
450-
resolved "https://registry.yarnpkg.com/fancy-test/-/fancy-test-1.0.1.tgz#28eb801dffc341d7202ed90b6944019922b08b5b"
463+
fancy-test@^1.0.4:
464+
version "1.0.4"
465+
resolved "https://registry.yarnpkg.com/fancy-test/-/fancy-test-1.0.4.tgz#fa689cfc98abec74a0b2f4386d92c58f1ef20f11"
451466
dependencies:
452-
lodash "^4.17.4"
453-
stdout-stderr "^0.1.6"
467+
lodash "^4.17.5"
468+
stdout-stderr "^0.1.8"
454469

455470
fast-glob@^2.0.2:
456471
version "2.0.3"
@@ -763,7 +778,7 @@ lazy-cache@^2.0.2:
763778
dependencies:
764779
set-getter "^0.1.0"
765780

766-
lodash@^4.17.4, lodash@^4.5.1:
781+
lodash@^4.17.5, lodash@^4.5.1:
767782
version "4.17.5"
768783
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.5.tgz#99a92d65c0272debe8c96b6057bc8fbfa3bed511"
769784

@@ -1068,10 +1083,11 @@ static-extend@^0.1.1:
10681083
define-property "^0.2.5"
10691084
object-copy "^0.1.0"
10701085

1071-
stdout-stderr@^0.1.6:
1072-
version "0.1.7"
1073-
resolved "https://registry.yarnpkg.com/stdout-stderr/-/stdout-stderr-0.1.7.tgz#f3f69391f3e721c2c52aa92fbfa18b8a6e9ce3df"
1086+
stdout-stderr@^0.1.8:
1087+
version "0.1.9"
1088+
resolved "https://registry.yarnpkg.com/stdout-stderr/-/stdout-stderr-0.1.9.tgz#9b48ee04eff955ee07776e27125d5524d9d02f57"
10741089
dependencies:
1090+
debug "^3.1.0"
10751091
strip-ansi "^4.0.0"
10761092

10771093
string-width@^2.1.1:
@@ -1125,6 +1141,12 @@ supports-color@^5.2.0:
11251141
dependencies:
11261142
has-flag "^3.0.0"
11271143

1144+
supports-color@^5.3.0:
1145+
version "5.3.0"
1146+
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.3.0.tgz#5b24ac15db80fa927cf5227a4a33fd3c4c7676c0"
1147+
dependencies:
1148+
has-flag "^3.0.0"
1149+
11281150
to-object-path@^0.3.0:
11291151
version "0.3.0"
11301152
resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af"
@@ -1163,7 +1185,7 @@ ts-node@^5.0.1:
11631185
source-map-support "^0.5.3"
11641186
yn "^2.0.0"
11651187

1166-
tslib@^1.0.0, tslib@^1.7.1, tslib@^1.8.0, tslib@^1.8.1:
1188+
tslib@1.9.0, tslib@^1.7.1, tslib@^1.8.0, tslib@^1.8.1:
11671189
version "1.9.0"
11681190
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.0.tgz#e37a86fda8cbbaf23a057f473c9f4dc64e5fc2e8"
11691191

@@ -1174,26 +1196,26 @@ tslint-consistent-codestyle@^1.11.0:
11741196
tslib "^1.7.1"
11751197
tsutils "^2.21.0"
11761198

1177-
tslint-eslint-rules@^4.1.1:
1178-
version "4.1.1"
1179-
resolved "https://registry.yarnpkg.com/tslint-eslint-rules/-/tslint-eslint-rules-4.1.1.tgz#7c30e7882f26bc276bff91d2384975c69daf88ba"
1199+
tslint-eslint-rules@^5.1.0:
1200+
version "5.1.0"
1201+
resolved "https://registry.yarnpkg.com/tslint-eslint-rules/-/tslint-eslint-rules-5.1.0.tgz#3232b318da55dbb5a83e3f5d657c1ddbb27b9ff2"
11801202
dependencies:
1181-
doctrine "^0.7.2"
1182-
tslib "^1.0.0"
1183-
tsutils "^1.4.0"
1203+
doctrine "0.7.2"
1204+
tslib "1.9.0"
1205+
tsutils "2.8.0"
11841206

11851207
tslint-microsoft-contrib@^5.0.2:
11861208
version "5.0.2"
11871209
resolved "https://registry.yarnpkg.com/tslint-microsoft-contrib/-/tslint-microsoft-contrib-5.0.2.tgz#ecc2a797f777a12f0066944cec0c81a9e7c59ee9"
11881210
dependencies:
11891211
tsutils "^2.12.1"
11901212

1191-
tslint-xo@^0.6.0:
1192-
version "0.6.0"
1193-
resolved "https://registry.yarnpkg.com/tslint-xo/-/tslint-xo-0.6.0.tgz#95a05b8dcac7aaa1f4d6ca1397a3c4c45a8b848e"
1213+
tslint-xo@^0.7.0:
1214+
version "0.7.0"
1215+
resolved "https://registry.yarnpkg.com/tslint-xo/-/tslint-xo-0.7.0.tgz#be5a1d67f8ade5d92aa8c0a21d9cfdcbaf06f3e0"
11941216
dependencies:
11951217
tslint-consistent-codestyle "^1.11.0"
1196-
tslint-eslint-rules "^4.1.1"
1218+
tslint-eslint-rules "^5.1.0"
11971219
tslint-microsoft-contrib "^5.0.2"
11981220

11991221
tslint@^5.9.1:
@@ -1213,9 +1235,11 @@ tslint@^5.9.1:
12131235
tslib "^1.8.0"
12141236
tsutils "^2.12.1"
12151237

1216-
tsutils@^1.4.0:
1217-
version "1.9.1"
1218-
resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-1.9.1.tgz#b9f9ab44e55af9681831d5f28d0aeeaf5c750cb0"
1238+
tsutils@2.8.0:
1239+
version "2.8.0"
1240+
resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.8.0.tgz#0160173729b3bf138628dd14a1537e00851d814a"
1241+
dependencies:
1242+
tslib "^1.7.1"
12191243

12201244
tsutils@^2.12.1, tsutils@^2.21.0:
12211245
version "2.21.1"
@@ -1227,9 +1251,9 @@ type-detect@^4.0.0:
12271251
version "4.0.8"
12281252
resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c"
12291253

1230-
typescript@^2.7.2:
1231-
version "2.7.2"
1232-
resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.7.2.tgz#2d615a1ef4aee4f574425cdff7026edf81919836"
1254+
typescript@^2.8.1:
1255+
version "2.8.1"
1256+
resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.8.1.tgz#6160e4f8f195d5ba81d4876f9c0cc1fbc0820624"
12331257

12341258
union-value@^1.0.0:
12351259
version "1.0.0"

0 commit comments

Comments
 (0)