Bug 379652 - konsole pane shows delete confirmation for temporary file
Summary: konsole pane shows delete confirmation for temporary file
Status: RESOLVED FIXED
Alias: None
Product: kdevplatform
Classification: Developer tools
Component: shell (show other bugs)
Version: 5.1.0
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-09 08:20 UTC by Lars DIECKOW
Modified: 2017-11-23 00:53 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 5.2.1
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lars DIECKOW 2017-05-09 08:20:23 UTC
reproduction
------------

    alias rm='/bin/rm -i'
    start kdevelop
    open the konsole pane

result
------

kdevelop! is run, which in turn calls kdevplatform_shell_environment.sh
output of these shell script is shown in the pane
there's a delete confirmation that's impossible to answer
the temporary file hangs around after the scripts finish

what should happen
------------------

don't show a delete confirmation
do delete the temporary file

remedy
------

add the `-f` option

diff --git a/kdevplatform_shell_environment.sh b/kdevplatform_shell_environment.sh
index 58b536e..6104276 100755
--- a/kdevplatform_shell_environment.sh
+++ b/kdevplatform_shell_environment.sh
@@ -786,7 +786,7 @@ function setenv! {
         executeInAppSync "if ! [ -e $(getCurrentShellEnvPath) ]; then touch $(getCurrentShellEnvPath); fi" ""
     fi
     source $TEMP
-    rm $TEMP
+    rm -f $TEMP
 }
 
 function showenv! {
Comment 1 Francis Herne 2017-11-23 00:53:28 UTC
Git commit 26fe4c7e87847215a910fd98ee4c43a9bdf9f1ac by Francis Herne, on behalf of Lars DIECKOW.
Committed on 23/11/2017 at 00:50.
Pushed by flherne into branch '5.2'.

Use 'rm -f' on tempfile, in case 'rm' is aliased to 'rm -i'.
FIXED-IN: 5.2.1

M  +1    -1    kdevplatform/util/kdevplatform_shell_environment.sh

https://commits.kde.org/kdevelop/26fe4c7e87847215a910fd98ee4c43a9bdf9f1ac