Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public Version ModuleVersion
get { return _moduleVersion; }
set { _moduleVersion = value; }
}
private Version _moduleVersion = new Version(1, 0);
private Version _moduleVersion = new Version(0, 0, 1);

/// <summary>
/// Set the module description
Expand Down Expand Up @@ -940,12 +940,12 @@ protected override void EndProcessing()
// Now open the output file...
PathUtils.MasterStreamOpen(
this,
filePath,
filePath,
#if UNIX
new UTF8Encoding(false), // UTF-8, no BOM
#else
EncodingConversion.Unicode, // UTF-16 with BOM
#endif
new UTF8Encoding(false), // UTF-8, no BOM
#else
EncodingConversion.Unicode, // UTF-16 with BOM
#endif
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this part of change caused by some character encoding? If no intentional change was made, you can get rid of it by using git reset HEAD^ and then git add -p (ignore this change section when adding).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As part of #4761 (comment), this file has mixed EOL characters. We can accept it to make the EOLs the same for this file or ignore it as I'm fixing this across the entire codebase in a separate PR.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, then we can accept this part of the changes.

/* defaultEncoding */ false,
/* Append */ false,
/* Force */ false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ Describe "Import-Module with ScriptsToProcess" -Tags "CI" {
$testCases = @(
@{ TestNameSuffix = 'for top-level module'; ipmoParms = @{'Name'='.\module1.psd1'}; Expected = '1' }
@{ TestNameSuffix = 'for top-level and nested module'; ipmoParms = @{'Name'='.\module2.psd1'}; Expected = '21' }
@{ TestNameSuffix = 'for top-level module when -Version is specified'; ipmoParms = @{'Name'='.\module1.psd1'; 'Version'='1.0'}; Expected = '1' }
@{ TestNameSuffix = 'for top-level and nested module when -Version is specified'; ipmoParms = @{'Name'='.\module2.psd1'; 'Version'='1.0'}; Expected = '21' }
@{ TestNameSuffix = 'for top-level module when -Version is specified'; ipmoParms = @{'Name'='.\module1.psd1'; 'Version'='0.0.1'}; Expected = '1' }
@{ TestNameSuffix = 'for top-level and nested module when -Version is specified'; ipmoParms = @{'Name'='.\module2.psd1'; 'Version'='0.0.1'}; Expected = '21' }
)

It "Verify ScriptsToProcess are executed <TestNameSuffix>" -TestCases $testCases {
Expand Down