Skip to content

Commit b827a82

Browse files
authored
Fix for #177 (#178)
1 parent eca6a0c commit b827a82

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

AppInspector/Commands/AnalyzeCommand.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,9 @@ void ConfigSourcetoScan()
233233
{
234234
WriteOnce.SafeLog("AnalyzeCommand::ConfigSourcetoScan", LogLevel.Trace);
235235

236+
if (String.IsNullOrEmpty(_arg_sourcePath))
237+
throw new OpException(ErrMsg.FormatString(ErrMsg.ID.CMD_REQUIRED_ARG_MISSING, "SourcePath"));
238+
236239
if (Directory.Exists(_arg_sourcePath))
237240
{
238241
try

AppInspector/Utils.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,13 @@ static public RuleSet GetDefaultRuleSet(Logger logger = null)
9494
}
9595

9696

97+
static public bool CLIExecutionContext()
98+
{
99+
Assembly assembly = Assembly.GetCallingAssembly();
100+
return assembly.GetName().Name.Contains("ApplicationInspector.CLI");
101+
}
102+
103+
97104

98105
/// <summary>
99106
/// Attempt to map application type tags or file type or language to identify
@@ -238,6 +245,9 @@ public static Logger SetupLogging(AllCommandOptions opts)
238245
}
239246

240247
LogLevel log_level = LogLevel.Error;//default
248+
if (String.IsNullOrEmpty(opts.LogFileLevel))
249+
opts.LogFileLevel = "Error";
250+
241251
try
242252
{
243253
log_level = LogLevel.FromString(opts.LogFileLevel);

ApplicationInspector.wiki

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit e6d27482f8d019318d6c7a077a0239a5c407c891

0 commit comments

Comments
 (0)