项目目录外的`sbt run` [英] `sbt run` from outside the project directory
本文介绍了项目目录外的`sbt run`的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我想运行我的 Scala 项目时,我 cd
到项目目录并执行
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?
推荐答案
我的回答受到了这个更普遍的问题的启发:如何从 Linux shell 运行具有与当前不同工作目录的程序?
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")
或
(cd myPath/ && exec sbt "run arg1")
这篇关于项目目录外的`sbt run`的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文