forked from dlang/tools
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rdmd: Fix: --force doesn't work with --eval
- Loading branch information
Abscissa
committed
Mar 30, 2012
1 parent
7aa1820
commit 72f40c8
Showing
1 changed file
with
11 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
|
@@ -649,12 +649,18 @@ int eval(string todo) | ||
"eval." ~ digestToString(digest)); | "eval." ~ digestToString(digest)); | ||
auto binName = progname ~ binExt; | auto binName = progname ~ binExt; | ||
|
|
||
if (exists(binName) || | bool compileFailure = false; | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
andralex
|
|||
// Compile it | if (!exists(binName) || force) | ||
(std.file.write(progname~".d", todo), | |||
run([ compiler, progname ~ ".d", "-of" ~ binName ]) == 0)) | |||
{ | { | ||
// It's there, just run it | // Compile it | ||
std.file.write(progname~".d", todo); | |||
if( run([ compiler, progname ~ ".d", "-of" ~ binName ]) != 0 ) | |||
compileFailure = true; | |||
} | |||
|
|||
if (!compileFailure) | |||
{ | |||
// Run it | |||
exec([ binName ]); | exec([ binName ]); | ||
} | } | ||
|
|
||
|
The only change needed here is on this line: