File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
workspaces/arborist/lib/arborist Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -176,7 +176,7 @@ module.exports = cls => class IdealTreeBuilder extends cls {
176
176
// public method
177
177
async buildIdealTree ( options = { } ) {
178
178
if ( this . idealTree ) {
179
- return Promise . resolve ( this . idealTree )
179
+ return this . idealTree
180
180
}
181
181
182
182
// allow the user to set reify options on the ctor as well.
@@ -194,8 +194,7 @@ module.exports = cls => class IdealTreeBuilder extends cls {
194
194
process . emit ( 'time' , 'idealTree' )
195
195
196
196
if ( ! options . add && ! options . rm && ! options . update && this [ _global ] ) {
197
- const er = new Error ( 'global requires add, rm, or update option' )
198
- return Promise . reject ( er )
197
+ throw new Error ( 'global requires add, rm, or update option' )
199
198
}
200
199
201
200
// first get the virtual tree, if possible. If there's a lockfile, then
You can’t perform that action at this time.
0 commit comments