Skip to content

Commit

Permalink
Make man e command consistent across all projects
Browse files Browse the repository at this point in the history
  • Loading branch information
robinraju committed Jul 9, 2020
1 parent 181f4b2 commit f656cf8
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions course-templates/dotty-cmt-template-common/project/Man.scala
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ object Man {
def man: Command = Command("man")(_ => optArg) { (state, arg) =>
arg match {
case Some(a) if a == "e" =>
val base: File = Project.extract(state).get(sourceDirectory)
val base: File = Project.extract(state).get(baseDirectory)
val readmeFile: File = {
val bPath = new File(base, "/test/resources/README.md")
if (bPath.isFile) bPath else new File(base, "../README.md")
if (bPath.isFile) bPath else new File(base, "README.md")
}
printOut(readmeFile)
Console.print("\n")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ object Man {
def man: Command = Command("man")(_ => optArg) { (state, arg) =>
arg match {
case Some(a) if a == "e" =>
val base: File = Project.extract(state).get(sourceDirectory)
val base: File = Project.extract(state).get(baseDirectory)
val readmeFile: File = {
val bPath = new File(base, "/test/resources/README.md")
if (bPath.isFile) bPath else new File(base, "../README.md")
if (bPath.isFile) bPath else new File(base, "README.md")
}
printOut(readmeFile)
Console.print("\n")
Expand Down
4 changes: 2 additions & 2 deletions course-templates/scala-cmt-template-common/project/Man.scala
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ object Man {
def man: Command = Command("man")(_ => optArg) { (state, arg) =>
arg match {
case Some(a) if a == "e" =>
val base: File = Project.extract(state).get(sourceDirectory)
val base: File = Project.extract(state).get(baseDirectory)
val readmeFile: File = {
val bPath = new File(base, "/test/resources/README.md")
if (bPath.isFile) bPath else new File(base, "../README.md")
if (bPath.isFile) bPath else new File(base, "README.md")
}
printOut(readmeFile)
Console.print("\n")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ object Man {
def man: Command = Command("man")(_ => optArg) { (state, arg) =>
arg match {
case Some(a) if a == "e" =>
val base: File = Project.extract(state).get(sourceDirectory)
val base: File = Project.extract(state).get(baseDirectory)
val readmeFile: File = {
val bPath = new File(base, "/test/resources/README.md")
if (bPath.isFile) bPath else new File(base, "../README.md")
if (bPath.isFile) bPath else new File(base, "README.md")
}
printOut(readmeFile)
Console.print("\n")
Expand Down

0 comments on commit f656cf8

Please sign in to comment.