Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

Commit bbb7cc5

Browse files
victorbdaviddias
authored andcommitted
fix: (cli/init) use cross-platform path separator
This fixes the command "init" on windows. Before this change, none of the files where actually added to your local repository. With this change, files are correctly added to the repository as windows uses "\" as the path separator instead of "/" (posix)
1 parent e776dfd commit bbb7cc5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/components/init-assets.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const CID = require('cids')
1111
// Add the default assets to the repo.
1212
module.exports = function addDefaultAssets (self, log, callback) {
1313
const initDocsPath = path.join(__dirname, '../../init-files/init-docs')
14-
const index = initDocsPath.lastIndexOf('/')
14+
const index = initDocsPath.lastIndexOf(path.sep)
1515

1616
pull(
1717
pull.values([initDocsPath]),

0 commit comments

Comments
 (0)