dhg
dhg

Reputation: 52681

`sbt run` from outside the project directory

When I want to run my Scala project, I cd to the project directory and do

$ sbt "run arg1"

How can I do the same operation from outside the project directory?

Upvotes: 23

Views: 6528

Answers (1)

Christopher Chiche
Christopher Chiche

Reputation: 15325

My answer is inpired by this more general question: How do I run a program with a different working directory from current, from Linux shell?

(cd myPath/; sbt "run arg1")

or

(cd myPath/ && exec sbt "run arg1")

Upvotes: 29

Related Questions