Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add better input error descriptions * Update documentation * Make invoke data an implicit parameter for inputs functions * Add shell checking for whether shebang is valid * NIT Refactor implicit to given/using, simplify validate args if clauses
- Loading branch information
1 parent
c200f61
commit 816f91b
Showing
15 changed files
with
302 additions
and
112 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
25 changes: 25 additions & 0 deletions
25
modules/build/src/main/scala/scala/build/input/ScalaCliInvokeData.scala
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 | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package scala.build.input | ||
|
||
/** Stores information about how the program has been evoked | ||
* | ||
* @param progName | ||
* the actual Scala CLI program name which was run | ||
* @param subCommandName | ||
* the name of the sub-command that was invoked by user | ||
* @param subCommand | ||
* the type of the sub-command that was invoked by user | ||
* @param isShebangCapableShell | ||
* does the host shell support shebang headers | ||
*/ | ||
|
||
case class ScalaCliInvokeData( | ||
progName: String, | ||
subCommandName: String, | ||
subCommand: SubCommand, | ||
isShebangCapableShell: Boolean | ||
) | ||
|
||
enum SubCommand: | ||
case Default extends SubCommand | ||
case Shebang extends SubCommand | ||
case Other extends SubCommand |
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
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
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
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
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
Oops, something went wrong.