Skip to content

Commit 936fa7a

Browse files
committedMar 20, 2024
Fix commercialhaskell#5615 Improve documentation of stack run
1 parent b93a952 commit 936fa7a

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed
 

‎doc/run_command.md

+8-6
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,22 @@ stack run [-- ARGUMENT(S) (e.g. stack run -- file.txt)]
99
~~~
1010

1111
`stack run` builds a project executable and runs it. If the command has a first
12-
argument and it is recognised as an executable target then that is built.
13-
Otherwise, the project's first executable is built. If the project has no
14-
executables Stack reports no executables found as an error.
12+
argument and it is recognised as the name of an executable component of a
13+
project package then that is built. Otherwise, the project's first executable is
14+
built. If the project has no executables Stack reports no executables found as
15+
an error.
1516

1617
!!! note
1718

18-
To identify a project's first executable, Stack lists the executable
19-
components, in order, for each package, listed in order. For example:
19+
To identify a project's first executable, and search for the name of an
20+
executable component, Stack lists the executable components, in order, for
21+
each package, listed in order. For example:
2022

2123
`packageA:a-exe` < `packageA:b-exe` < `packageB:a-exe` < `packageB:b-exe`
2224

2325
Everything after `--` on the command line is interpreted as a command line
2426
argument to be passed to what is run, other than a first argument recognised as
25-
an executable target.
27+
the name of an executable component of a project package.
2628

2729
By default:
2830

0 commit comments

Comments
 (0)
Please sign in to comment.