Skip to content

Commit 870a61d

Browse files
committed
added directoryNotEmpty assertion
1 parent bb9cdcf commit 870a61d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

runners/console/index.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -637,11 +637,12 @@ export class Console extends Runner {
637637

638638
async assertAdaptTemplatesCobiGen(step: Step, command: Command, result: RunResult) {
639639
try {
640-
let homedir = os.homedir();
640+
let templateDir = path.join(os.homedir(), ".cobigen", "templates");
641641
new Assertions()
642642
.noErrorCode(result)
643643
.noException(result)
644-
.directoryExits(path.join(homedir, ".cobigen", "templates"));
644+
.directoryExits(templateDir)
645+
.directoryNotEmpty(templateDir);
645646

646647
} catch(error) {
647648
this.cleanUp();

0 commit comments

Comments
 (0)