Skip to content

Commit e394725

Browse files
committed
fix: make bin/index.ts cross-platform by normalizing paths
Using it on Windows was generating a Manifest with commandPath like : `./commands/Make\\Command`. What broke the v5.9.1 build
1 parent 679754b commit e394725

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

bin/index.ts

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,17 @@ import { join } from 'path'
1111
import { ManifestGenerator } from '@adonisjs/ace'
1212
import { fsReadAll } from '@poppinss/utils/build/helpers'
1313

14+
/**
15+
* Get the file path to every assembler commands
16+
*/
17+
const commandsPaths = fsReadAll(
18+
join(__dirname, '../commands'),
19+
(file) => !file.includes('Base') && file.endsWith('.js')
20+
)
21+
.map((file) => `./commands/${file}`)
22+
.map((file) => file.replace(/\\/g, '/'))
23+
1424
/**
1525
* Generates ace-manifest file
1626
*/
17-
new ManifestGenerator(
18-
join(__dirname, '..'),
19-
fsReadAll(
20-
join(__dirname, '../commands'),
21-
(file) => !file.includes('Base') && file.endsWith('.js')
22-
).map((file) => `./commands/${file}`)
23-
).generate()
27+
new ManifestGenerator(join(__dirname, '..'), commandsPaths).generate()

0 commit comments

Comments
 (0)