Skip to content

Commit 20ef0ce

Browse files
committed
chore: update logs
1 parent 3413151 commit 20ef0ce

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/file.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ import { handleErr } from "./utils"
1111
const { stat, access, mkdir, readFile, writeFile } = fs
1212

1313
export async function createDirIfNotExists(dir: string, config: ScaffoldConfig): Promise<void> {
14+
if (config.dryRun) {
15+
log(config, LogLevel.Info, `Dry Run. Not creating dir ${dir}`)
16+
return
17+
}
1418
const parentDir = path.dirname(dir)
1519

1620
if (!(await pathExists(parentDir))) {
@@ -147,7 +151,7 @@ export async function copyFileTransformed(
147151
log(config, LogLevel.Info, "Done.")
148152
} else {
149153
log(config, LogLevel.Info, "Dry Run. Output should be:")
150-
log(config, LogLevel.Info, finalOutputContents)
154+
log(config, LogLevel.Info, finalOutputContents.toString())
151155
}
152156
} else if (exists) {
153157
log(config, LogLevel.Info, `File ${outputPath} already exists, skipping`)

0 commit comments

Comments
 (0)