Skip to content
This repository was archived by the owner on Oct 7, 2020. It is now read-only.

Commit 1f4f1f2

Browse files
authored
Merge pull request #1051 from Anrock/unhardcode-script-name-in-install
Unhardcode script name in help message of install.hs
2 parents 2d144e9 + a7ff096 commit 1f4f1f2

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

install.hs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ import Development.Shake
1515
import Development.Shake.Command
1616
import Development.Shake.FilePath
1717
import Control.Monad
18-
import System.Environment ( unsetEnv )
18+
import System.Environment ( getProgName
19+
, unsetEnv
20+
)
1921
import System.Info ( os
2022
, arch
2123
)
@@ -170,9 +172,10 @@ buildDoc versionNumber = do
170172
helpMessage :: Action ()
171173
helpMessage = do
172174
let out = liftIO . putStrLn
175+
scriptName <- liftIO getProgName
173176
out ""
174177
out "Usage:"
175-
out " stack install.hs <target>"
178+
out (" stack " <> scriptName <> " <target>")
176179
out ""
177180
out "Targets:"
178181
out

0 commit comments

Comments
 (0)