Skip to content
This repository has been archived by the owner on Sep 23, 2021. It is now read-only.

Cancelation fails on windows for non english users #96

Closed
zvin opened this issue May 27, 2019 · 4 comments
Closed

Cancelation fails on windows for non english users #96

zvin opened this issue May 27, 2019 · 4 comments

Comments

@zvin
Copy link

zvin commented May 27, 2019

The code checks for canceled by the user but this message depends on the language.

French for example: Impossible d'exécuter cette commande en raison de l'erreur: L'opération a été annulée par l'utilisateur

@jorangreef
Copy link
Owner

Thanks @zvin, anything else we can use on Windows to check? We ran into this on Linux in the past.

@zvin
Copy link
Author

zvin commented May 27, 2019

We use GetLastError() == ERROR_CANCELLED in a native module here https://github.com/balena-io/etcher/blob/master/src/os/win32/elevate.cpp#L87 , I'm not sure we can get this from powershell or cmd. Or maybe there's a way to force the message to be in English?

@jorangreef
Copy link
Owner

Another way might be for us to wrap the user command in its own shell script, so that we can distinguish between runAs errors and user command errors. We do this for Mac and need to do this for Linux.

@jorangreef
Copy link
Owner

If you can give me a few days, I will work on this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants