From 9faf87389feeb680752c5e7c6cfa5d1cbf4e270e Mon Sep 17 00:00:00 2001 From: Dmitry Maksyoma Date: Wed, 15 Sep 2021 18:01:47 +1200 Subject: [PATCH] vncserver: no xstartup overwrite confirmation if it doesn't exist --- builder/startup/deb/select-de.sh | 4 ++++ spec/vncserver_spec.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/builder/startup/deb/select-de.sh b/builder/startup/deb/select-de.sh index 926344e..9f47b8d 100755 --- a/builder/startup/deb/select-de.sh +++ b/builder/startup/deb/select-de.sh @@ -169,6 +169,10 @@ warn_xstartup_will_be_overwriten() { return 0 fi + if [ ! -f "$xstartup_script" ]; then + return 0 + fi + echo -n "WARNING: $xstartup_script will be overwritten y/N?" read -r do_overwrite_xstartup if [[ "$do_overwrite_xstartup" = "y" || "$do_overwrite_xstartup" = "Y" ]]; then diff --git a/spec/vncserver_spec.py b/spec/vncserver_spec.py index 82faa1b..598f8e0 100644 --- a/spec/vncserver_spec.py +++ b/spec/vncserver_spec.py @@ -51,7 +51,7 @@ with description('vncserver') as self: with it('asks user to select a DE on the first run'): add_kasmvnc_user_docker() - completed_process = run_cmd(vncserver_cmd, input="1\ny\n") + completed_process = run_cmd(vncserver_cmd, input="1\n") expect(completed_process.returncode).to(equal(0)) check_de_was_setup_to_run('cinnamon')