1
- using System ;
2
1
using System . Collections . Generic ;
3
2
using System . IO ;
4
3
using System . Linq ;
@@ -121,24 +120,6 @@ private static FileInfo[] GetDefaultFiles()
121
120
}
122
121
}
123
122
124
- /// <summary>
125
- /// Returns true if the extractor should skip files in the PSModulePath because the
126
- /// environment variable CODEQL_EXTRACTOR_POWERSHELL_OPTION_SKIP_PSMODULEPATH_FILES
127
- /// is set to a truthy value.
128
- /// </summary>
129
- private static bool GetDefaultSkipPSModulePathFiles ( )
130
- {
131
- var skip = System . Environment . GetEnvironmentVariable (
132
- "CODEQL_EXTRACTOR_POWERSHELL_OPTION_SKIP_PSMODULEPATH_FILES"
133
- ) ;
134
- bool b = skip != null && skip . ToLower ( ) != "false" ;
135
- if ( b )
136
- {
137
- System . Console . WriteLine ( "Skipping files in PSModulePath" ) ;
138
- }
139
- return b ;
140
- }
141
-
142
123
/// <summary>
143
124
/// The directory or file containing the source code;
144
125
/// </summary>
@@ -153,7 +134,7 @@ private static bool GetDefaultSkipPSModulePathFiles()
153
134
/// Whether to extract files in the paths found in the `PSModulePath`
154
135
/// environment variable.
155
136
/// </summary>
156
- public bool SkipPSModulePathFiles { get ; private set ; } = GetDefaultSkipPSModulePathFiles ( ) ;
137
+ public bool SkipPSModulePathFiles { get ; private set ; } = false ;
157
138
158
139
/// <summary>
159
140
/// Whether errors were encountered parsing the arguments.
@@ -191,13 +172,9 @@ public static void ShowHelp(System.IO.TextWriter output)
191
172
" --exclude:xxx Exclude a file or directory (can be specified multiple times)"
192
173
) ;
193
174
output . WriteLine ( " --dry-run Stop before extraction" ) ;
194
- output . WriteLine (
195
- " --threads:nnn Specify number of threads (default=CPU cores)"
196
- ) ;
175
+ output . WriteLine ( " --threads:nnn Specify number of threads (default=CPU cores)" ) ;
197
176
output . WriteLine ( " --verbose Produce more output" ) ;
198
- output . WriteLine (
199
- " --skip-psmodulepath-files Avoid extracting source files in paths specified by the PSModulePath environment variable."
200
- ) ;
177
+ output . WriteLine ( " --skip-psmodulepath-files Avoid extracting source files in paths specified by the PSModulePath environment variable." ) ;
201
178
}
202
179
203
180
private Options ( ) { }
0 commit comments