Skip to content

Commit c0614cb

Browse files
committed
Remove unused code and test
1 parent b38dacf commit c0614cb

File tree

3 files changed

+0
-19
lines changed

3 files changed

+0
-19
lines changed

dsc/locales/en-us.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,5 +160,4 @@ failedToAbsolutizePath = "Error making config path absolute"
160160
failedToGetParentPath = "Error reading config path parent"
161161
dscConfigRootAlreadySet = "The current value of DSC_CONFIG_ROOT env var will be overridden"
162162
settingDscConfigRoot = "Setting DSC_CONFIG_ROOT env var as"
163-
stdinNotAllowedForBothParametersAndInput = "Cannot read from STDIN for both parameters and input."
164163
removingUtf8Bom = "Removing UTF-8 BOM from input"

dsc/src/util.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -448,10 +448,6 @@ pub fn get_input(input: Option<&String>, file: Option<&String>, parameters_from_
448448
// check if need to read from STDIN
449449
if path == "-" {
450450
info!("{}", t!("util.readingInputFromStdin"));
451-
if parameters_from_stdin {
452-
error!("{}", t!("util.stdinNotAllowedForBothParametersAndInput"));
453-
exit(EXIT_INVALID_INPUT);
454-
}
455451
let mut stdin = Vec::<u8>::new();
456452
match std::io::stdin().read_to_end(&mut stdin) {
457453
Ok(_) => {

dsc/tests/dsc_parameters.tests.ps1

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -380,20 +380,6 @@ Describe 'Parameters tests' {
380380
$out.results[0].result.inDesiredState | Should -Be $IsWindows
381381
}
382382

383-
It 'Parameters and input cannot both be from STDIN' {
384-
$params = @{
385-
parameters = @{
386-
osFamily = 'Windows'
387-
}
388-
} | ConvertTo-Json -Compress
389-
390-
$out = $params | dsc config -f - test -f - 2> $TestDrive/error.log
391-
$LASTEXITCODE | Should -Be 4
392-
$out | Should -BeNullOrEmpty
393-
$errorMessage = Get-Content -Path $TestDrive/error.log -Raw
394-
$errorMessage | Should -BeLike "*ERROR*Cannot read from STDIN for both parameters and input*"
395-
}
396-
397383
It 'Invalid parameters read from STDIN result in error' {
398384
$params = @{
399385
osFamily = 'Windows'

0 commit comments

Comments
 (0)