Wizard: handle dos scripts in first boot
Scripts in which lines are terminated by CRLF break the first boot service, so let's make sure the line termination is correct.
This commit is contained in:
parent
ba9546193e
commit
7b365dcb4d
3 changed files with 38 additions and 2 deletions
|
|
@ -73,7 +73,10 @@ const FirstBootStep = () => {
|
|||
isCopyEnabled
|
||||
isLanguageLabelVisible
|
||||
language={language}
|
||||
onCodeChange={(code) => dispatch(setFirstBootScript(code))}
|
||||
onCodeChange={(code) => {
|
||||
// In case the user is on windows
|
||||
dispatch(setFirstBootScript(code.replace('\r\n', '\n')));
|
||||
}}
|
||||
code={selectedScript}
|
||||
height="35vh"
|
||||
emptyStateButton={<span data-testid="firstboot_browse">Browse</span>}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue