This repository has been archived by the owner on May 27, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
63 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
namespace rune.cmd.Internal | ||
{ | ||
using System; | ||
using System.Drawing; | ||
using System.IO; | ||
using Ancient.ProjectSystem; | ||
using etc; | ||
|
||
public abstract class WithProject | ||
{ | ||
public bool Validate(string directory) | ||
{ | ||
var projectFiles = Directory.GetFiles(directory, "*.rune.json"); | ||
|
||
if (projectFiles.Length == 0) | ||
{ | ||
Console.WriteLine($"{":fried_shrimp:".Emoji()} {"Couldn't".Nier().Color(Color.Red)} find a project to run. Ensure a project exists in {directory}."); | ||
return false; | ||
} | ||
if (projectFiles.Length > 1) | ||
{ | ||
Console.WriteLine($"{":fried_shrimp:".Emoji()} {"Specify".Nier().Color(Color.Red)} which project file to use because this folder contains more than one project file.."); | ||
return false; | ||
} | ||
return true; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters