@@ -24,6 +24,9 @@ public override bool HandleFlag(string key, bool value)
24
24
case "dry-run" :
25
25
SkipExtraction = value ;
26
26
return true ;
27
+ case "skip-psmodulepath-files" :
28
+ SkipPSModulePathFiles = value ;
29
+ return true ;
27
30
default :
28
31
return base . HandleFlag ( key , value ) ;
29
32
}
@@ -127,6 +130,12 @@ private static FileInfo[] GetDefaultFiles()
127
130
/// </summary>
128
131
public bool SkipExtraction { get ; private set ; } = false ;
129
132
133
+ /// <summary>
134
+ /// Whether to extract files in the paths found in the `PSModulePath`
135
+ /// environment variable.
136
+ /// </summary>
137
+ public bool SkipPSModulePathFiles { get ; private set ; } = false ;
138
+
130
139
/// <summary>
131
140
/// Whether errors were encountered parsing the arguments.
132
141
/// </summary>
@@ -158,13 +167,14 @@ public static void ShowHelp(System.IO.TextWriter output)
158
167
"PowerShell# standalone extractor\n \n Extracts PowerShell scripts in the current directory.\n "
159
168
) ;
160
169
output . WriteLine ( "Additional options:\n " ) ;
161
- output . WriteLine ( " <path> Use the provided path instead." ) ;
170
+ output . WriteLine ( " <path> Use the provided path instead." ) ;
162
171
output . WriteLine (
163
- " --exclude:xxx Exclude a file or directory (can be specified multiple times)"
172
+ " --exclude:xxx Exclude a file or directory (can be specified multiple times)"
164
173
) ;
165
- output . WriteLine ( " --dry-run Stop before extraction" ) ;
166
- output . WriteLine ( " --threads:nnn Specify number of threads (default=CPU cores)" ) ;
167
- output . WriteLine ( " --verbose Produce more output" ) ;
174
+ output . WriteLine ( " --dry-run Stop before extraction" ) ;
175
+ output . WriteLine ( " --threads:nnn Specify number of threads (default=CPU cores)" ) ;
176
+ output . WriteLine ( " --verbose Produce more output" ) ;
177
+ output . WriteLine ( " --skip-psmodulepath-files Avoid extracting source files in paths specified by the PSModulePath environment variable." ) ;
168
178
}
169
179
170
180
private Options ( ) { }
0 commit comments