Skip to content

Commit

Permalink
fix: use createTempPath for Rust
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Mar 22, 2021
1 parent 67abf6e commit bb74d13
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/grammars/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,8 @@ const OtherGrammars = {
if (windows) {
return [`/c rustc ${filepath} && ${filename.slice(0, Number(-4) + 1 || undefined)}.exe`]
} else {
return ["-c", `rustc '${filepath}' -o /tmp/rs.out && /tmp/rs.out`]
const tempOutFile = GrammarUtils.createTempPath("rs-", ".out")
return ["-c", `rustc '${filepath}' -o ${tempOutFile} && ${tempOutFile}`]
}
},
},
Expand Down

0 comments on commit bb74d13

Please sign in to comment.