Skip to content

Add support for Windows#4

Open
kant2002 wants to merge 4 commits intodiia-open-source:mainfrom
kant2002:patch-2
Open

Add support for Windows#4
kant2002 wants to merge 4 commits intodiia-open-source:mainfrom
kant2002:patch-2

Conversation

@kant2002
Copy link
Contributor

No description provided.

}

const splittedPath = value.split('/')
const splittedPath = value.split(/[\/\\]/)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe use std lib prop for that?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems I pasted wrong link

https://nodejs.org/api/path.html#pathsep

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Насправді я не впевнений що це спражні шляхи у файловій системі, а не віртуальний код чогось. Тому я тут трішки більше ніж треба беру. Анотувати увесь код щоб перевірити це буде багато праці.

src/genproto.ts Outdated
try {
let commandLine = command.join(' ');
if (process.platform === 'win32') {
const tempFile = os.tmpdir() + '\\genproto.cmd'
Copy link

@ZuBB ZuBB Mar 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

path.join(os.tmpdir(), 'genproto.cmd')

src/genproto.ts Outdated
logger.log(err.stack)
} finally {
if (process.platform === 'win32') {
const tempFile = os.tmpdir() + '\\genproto.cmd'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the same issue here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants