@@ -227,6 +227,12 @@ public static ImportSettings Parse(string[] args, string rootFolder, ILogger log
227227 case "-input" :
228228 Log . Write ( "input = " + param ) ;
229229
230+ if ( string . IsNullOrEmpty ( param . Trim ( ) ) )
231+ {
232+ importSettings . errors . Add ( "Input file not defined: " + param ) ;
233+ break ;
234+ }
235+
230236 // remove quotes (needed for paths with spaces)
231237 param = param . Trim ( '"' ) ;
232238
@@ -291,6 +297,14 @@ public static ImportSettings Parse(string[] args, string rootFolder, ILogger log
291297 case "-output" :
292298 Log . Write ( "output = " + param ) ;
293299
300+ if ( string . IsNullOrEmpty ( param . Trim ( ) ) )
301+ {
302+ importSettings . errors . Add ( "Output not defined: " + param ) ;
303+ break ;
304+ }
305+
306+ param = param . Trim ( '"' ) ;
307+
294308 // check if relative or not
295309 if ( Path . IsPathRooted ( param ) == false )
296310 {
@@ -663,7 +677,7 @@ public static ImportSettings Parse(string[] args, string rootFolder, ILogger log
663677 }
664678 else
665679 {
666- importSettings . errors . Add ( "Invalid offset parameter: " + param ) ;
680+ importSettings . errors . Add ( "Invalid offset parameter (Use: min or legacy) : " + param ) ;
667681 }
668682 }
669683 else // autooffset
@@ -784,7 +798,7 @@ public static ImportSettings Parse(string[] args, string rootFolder, ILogger log
784798
785799 if ( param != "legacy" && param != "min" )
786800 {
787- importSettings . errors . Add ( "Invalid offsetmode parameter: " + param ) ;
801+ importSettings . errors . Add ( "Invalid offset parameter: (Use: min or legacy) " + param ) ;
788802 }
789803 else
790804 {
@@ -847,6 +861,9 @@ public static ImportSettings Parse(string[] args, string rootFolder, ILogger log
847861 Tools . PrintHelpAndExit ( argValueSeparator , waitEnter : true ) ;
848862 }
849863
864+
865+ // *** VALIDATE SETTINGS ***
866+
850867 // check that we had input
851868 if ( importSettings . inputFiles . Count == 0 || string . IsNullOrEmpty ( importSettings . inputFiles [ 0 ] ) == true )
852869 {
@@ -916,6 +933,7 @@ public static ImportSettings Parse(string[] args, string rootFolder, ILogger log
916933 }
917934 } // have input
918935
936+
919937 // check required settings
920938 if ( importSettings . exportFormat == ExportFormat . Unknown )
921939 {
0 commit comments