Bug 379652

Summary: konsole pane shows delete confirmation for temporary file
Product: [Developer tools] kdevplatform Reporter: Lars DIECKOW <lars.dieckow>
Component: shellAssignee: kdevelop-bugs-null
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 5.1.0   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In: 5.2.1

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