Skip to content

Commit 7894dac

Browse files
Fixing Windows Issues
1 parent 5a79c88 commit 7894dac

File tree

3 files changed

+42
-13
lines changed

3 files changed

+42
-13
lines changed

commands/delete.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ module.exports = async () => {
3232
}
3333

3434
if (found) {
35+
console.log('')
3536
const prompt = new confirm('Confirm Delete?')
3637
prompt.ask(function(confirmed) {
3738
if (confirmed) {

commands/setup.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
const argv = require('minimist')(process.argv.slice(2))
22
const chalk = require('chalk')
33
const fs = require('fs')
4+
const path = require('path')
45
const prompt = require('prompt')
56
const slug = require('slug')
67

@@ -29,6 +30,9 @@ module.exports = async () => {
2930
prompt.delimiter = ''
3031
prompt.override = argv
3132

33+
// Intentional Blank Line
34+
console.log('')
35+
3236
prompt.start()
3337
prompt.get(
3438
[
@@ -85,6 +89,7 @@ module.exports = async () => {
8589
required: true,
8690
message: 'Directory does not exist. ( e.g. /Users/RVW/Projects/mysandbox )',
8791
conform: function(directory) {
92+
directory = path.normalize(path.resolve(directory.replace(/^\/[a-z]\//, '/')))
8893
return fs.existsSync(directory)
8994
}
9095
},
@@ -130,22 +135,26 @@ module.exports = async () => {
130135
newConfig[client] = {}
131136
}
132137

138+
const directory = path.normalize(path.resolve(result.d.replace(/^\/[a-z]\//, '/')))
139+
133140
// Fetch Build Scripts from Project Directory
134-
const builders = builds(result.d)
141+
const builders = builds(directory)
135142

136143
// Create / Overwrite SFCC Instance for Client
137144
newConfig[client][alias] = {
138145
h: result.h,
139146
v: result.v,
140147
a: result.a,
141-
d: result.d,
148+
d: directory,
142149
u: result.u,
143150
p: result.p,
144151
b: builders
145152
}
146153

147154
// Write Config File
148155
config.set(newConfig, isUpdate)
156+
157+
process.exit()
149158
}
150159
}
151160
)

package-lock.json

Lines changed: 30 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)