We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 84f3847 commit ca7d9aeCopy full SHA for ca7d9ae
main.go
@@ -12,6 +12,7 @@ import (
12
"os/signal"
13
"os/user"
14
"path"
15
+ "strings"
16
17
"github.com/arduino/arduino-language-server/ls"
18
"github.com/arduino/arduino-language-server/streams"
@@ -22,6 +23,12 @@ import (
22
23
func main() {
24
if len(os.Args) > 1 && os.Args[1] == "remove-temp-files" {
25
for _, tmpFile := range os.Args[2:] {
26
+ // SAFETY CHECK
27
+ if !strings.Contains(tmpFile, "arduino-language-server") {
28
+ fmt.Println("Could not remove extraneous temp folder:", tmpFile)
29
+ os.Exit(1)
30
+ }
31
+
32
paths.New(tmpFile).RemoveAll()
33
}
34
return
0 commit comments