RX0111

Domain: Parsing

Error message

not a RushScript file: %s (%s)

In the message, %s marks a value that the engine fills in when it raises the error.

The story

You pointed rush at a file, and the engine does not believe it is a RushScript file. Here is how rush knows. Line one must be a shebang that names the rush program. That is the only thing that identifies a file as RushScript. And the engine reads the program name at the end, not the full path. So slash bin slash rush, slash usr slash bin slash env rush, and slash usr slash local slash bin slash rush are all accepted. What fails? A file with no shebang at all. A file whose shebang names another program, like the shell. Or the old style realm lines, such as shebang declare or shebang call, which are replaced now by the proper first line, followed by a domain line on line two. The refusal happens before a single statement is read. It also decides what a project loads: a file under src without the shebang is simply not source. The fix is one line. Put the rush shebang first in the file, and everything else follows.

Text from the Rush engine's error catalogue.