File tree Expand file tree Collapse file tree 1 file changed +8
-12
lines changed Expand file tree Collapse file tree 1 file changed +8
-12
lines changed Original file line number Diff line number Diff line change @@ -150,28 +150,24 @@ export let getChangedPackages = async ({
150
150
}
151
151
}
152
152
153
- if (
154
- ! tool ||
155
- ! (
156
- Array . isArray ( tool . globs ) &&
157
- tool . globs . every ( ( x ) => typeof x === "string" )
158
- )
159
- ) {
160
- throw new Error ( "globs are not valid" ) ;
161
- }
162
-
163
153
let rootPackageJsonContent = await rootPackageJsonContentsPromise ;
164
154
165
155
let packages : Packages = {
166
156
root : {
167
157
dir : "/" ,
168
158
packageJson : rootPackageJsonContent ,
169
159
} ,
170
- tool : tool . tool ,
160
+ tool : tool ? tool . tool : "root" ,
171
161
packages : [ ] ,
172
162
} ;
173
163
174
164
if ( tool ) {
165
+ if (
166
+ ! Array . isArray ( tool . globs ) ||
167
+ ! tool . globs . every ( ( x ) => typeof x === "string" )
168
+ ) {
169
+ throw new Error ( "globs are not valid: " + JSON . stringify ( tool . globs ) ) ;
170
+ }
175
171
let matches = micromatch ( potentialWorkspaceDirectories , tool . globs ) ;
176
172
177
173
packages . packages = await Promise . all (
@@ -181,7 +177,7 @@ export let getChangedPackages = async ({
181
177
packages . packages . push ( packages . root ) ;
182
178
}
183
179
if ( hasErrored ) {
184
- throw new Error ( "an error occurred" ) ;
180
+ throw new Error ( "an error occurred when fetching files " ) ;
185
181
}
186
182
187
183
const releasePlan = assembleReleasePlan (
You can’t perform that action at this time.
0 commit comments