We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bd3dce6 commit c56a5f7Copy full SHA for c56a5f7
src/createSfx.ts
@@ -133,10 +133,18 @@ export function createSfx(
133
reject: (err: string) => void,
134
progress: (data: any) => any
135
) {
136
- let directory =
137
- destination != '' && fs.existsSync(destination)
138
- ? destination
139
- : getPath('when');
+ let directory = undefined;
+ if (destination && fs.existsSync(destination))
+ directory = destination;
+ else {
140
+ const whenPath = getPath('when');
141
+ if (whenPath) {
142
+ directory = whenPath;
143
+ } else {
144
+ throw new Error('Path for "when" module not found!');
145
+ }
146
147
+
148
let SfxDirectory = join(directory, 'SfxPackages');
149
fs.ensureDirSync(SfxDirectory);
150
let override =
0 commit comments