`sbt run` from outside the project directory

前端 未结 1 1168
臣服心动
臣服心动 2021-02-07 01:43

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

1条回答
  •  花落未央
    2021-02-07 02:08

    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")
    

    0 讨论(0)
提交回复
热议问题