Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
c088ebef
Commit
c088ebef
authored
Jan 20, 2012
by
Shenghou Ma
Committed by
Russ Cox
Jan 20, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
go run: correctly handle -n and -x flags
R=golang-dev, rsc CC=golang-dev
https://golang.org/cl/5557069
parent
46e7cb57
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
run.go
src/cmd/go/run.go
+9
-1
No files found.
src/cmd/go/run.go
View file @
c088ebef
...
...
@@ -4,7 +4,9 @@
package
main
import
()
import
(
"strings"
)
var
cmdRun
=
&
Command
{
UsageLine
:
"run [-a] [-n] [-x] gofiles... [-- arguments...]"
,
...
...
@@ -42,6 +44,12 @@ func runRun(cmd *Command, args []string) {
// runProgram is the action for running a binary that has already
// been compiled. We ignore exit status.
func
(
b
*
builder
)
runProgram
(
a
*
action
)
error
{
if
buildN
||
buildX
{
b
.
showcmd
(
""
,
"%s %s"
,
a
.
deps
[
0
]
.
target
,
strings
.
Join
(
a
.
args
,
" "
))
if
buildN
{
return
nil
}
}
run
(
a
.
deps
[
0
]
.
target
,
a
.
args
)
return
nil
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment