Skip to content

Commit 0430004

Browse files
authored
Merge branch 'main' into docs/main/v3-reference
2 parents de65bee + 63927a8 commit 0430004

32 files changed

+456
-103
lines changed

.config/tsaoptions.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"projectName": "One",
44
"areaPath": "One\\MGMT\\Compute\\PowerShell Desired State Configuration",
55
"notificationAliases": [
6-
"anmenaga@microsoft.com",
6+
"tessgauthier@microsoft.com",
77
88
]
99
}

.pipelines/DSC-Official.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ extends:
207207
apt -y install gcc-multilib
208208
apt -y install libssl-dev
209209
apt -y install pkg-config
210-
rustup default stable-aarch64-unknown-linux-musl
210+
msrustup default stable-aarch64-unknown-linux-musl
211211
if ((openssl version -d) -match 'OPENSSLDIR: "(?<dir>.*?)"') {
212212
$env:OPENSSL_LIB_DIR = $matches['dir']
213213
}

build.ps1

+3-3
Original file line numberDiff line numberDiff line change
@@ -124,14 +124,14 @@ function Find-LinkExe {
124124
}
125125

126126
$channel = 'stable'
127-
if ($null -ne (Get-Command rustup -ErrorAction Ignore)) {
128-
$rustup = 'rustup'
129-
} elseif ($null -ne (Get-Command msrustup -ErrorAction Ignore)) {
127+
if ($null -ne (Get-Command msrustup -CommandType Application -ErrorAction Ignore)) {
130128
$rustup = 'msrustup'
131129
$channel = 'ms-stable'
132130
if ($architecture -eq 'current') {
133131
$env:MSRUSTUP_TOOLCHAIN = "$architecture"
134132
}
133+
} elseif ($null -ne (Get-Command rustup -CommandType Application -ErrorAction Ignore)) {
134+
$rustup = 'rustup'
135135
} else {
136136
$rustup = 'echo'
137137
}

dsc/Cargo.lock

+104-34
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dsc/Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "dsc"
3-
version = "3.1.0-preview.2"
3+
version = "3.1.0-preview.3"
44
edition = "2021"
55

66
[profile.release]
@@ -13,7 +13,7 @@ lto = true
1313
[dependencies]
1414
clap = { version = "4.5", features = ["derive"] }
1515
clap_complete = { version = "4.5" }
16-
crossterm = { version = "0.28" }
16+
crossterm = { version = "0.29" }
1717
ctrlc = { version = "3.4" }
1818
dsc_lib = { path = "../dsc_lib" }
1919
indicatif = { version = "0.17" }
@@ -25,7 +25,7 @@ serde = { version = "1.0", features = ["derive"] }
2525
serde_json = { version = "1.0", features = ["preserve_order"] }
2626
serde_yaml = { version = "0.9" }
2727
syntect = { version = "5.0", features = ["default-fancy"], default-features = false }
28-
sysinfo = { version = "0.33" }
28+
sysinfo = { version = "0.34" }
2929
thiserror = "2.0"
3030
tracing = { version = "0.1" }
3131
tracing-subscriber = { version = "0.3", features = ["ansi", "env-filter", "json"] }

dsc/assertion.dsc.resource.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"pass-through",
1212
"config",
1313
"--as-group",
14+
"--as-assert",
1415
"test",
1516
"--as-get",
1617
{
@@ -26,6 +27,7 @@
2627
"pass-through",
2728
"config",
2829
"--as-group",
30+
"--as-assert",
2931
"test",
3032
{
3133
"jsonInputArg": "--input",
@@ -42,6 +44,7 @@
4244
"pass-through",
4345
"config",
4446
"--as-group",
47+
"--as-assert",
4548
"test",
4649
"--as-config",
4750
{
@@ -59,7 +62,8 @@
5962
"4": "Invalid input format",
6063
"5": "Resource instance failed schema validation",
6164
"6": "Command cancelled",
62-
"7": "Resource not found"
65+
"7": "Resource not found",
66+
"8": "Assertion failed"
6367
},
6468
"validate": {
6569
"executable": "dsc",

dsc/examples/assertion.dsc.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@ resources:
2323
keyPath: HKLM\Software\Microsoft\Windows NT\CurrentVersion
2424
valueName: SystemRoot
2525
valueData:
26-
# this is deliberately set to z: drive so that the assertion fails
27-
String: Z:\Windows
26+
# this is deliberately set to L: drive so that the assertion fails
27+
String: L:\Windows

dsc/locales/en-us.toml

+1
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ testInputEmpty = "Expected input is required"
7373
[subcommand]
7474
actualStateNotObject = "actual_state is not an object"
7575
unexpectedTestResult = "Unexpected Group TestResult"
76+
assertionFailed = "Assertion failed for resource '%{resource_type}'"
7677
message = "message"
7778
currentDirectory = "current directory"
7879
noParameters = "No parameters specified"

dsc/src/args.rs

+2
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ pub enum SubCommand {
5858
// Used to inform when DSC is used as a group resource to modify it's output
5959
#[clap(long, hide = true)]
6060
as_group: bool,
61+
#[clap(long, hide = true)]
62+
as_assert: bool,
6163
// Used to inform when DSC is used as a include group resource
6264
#[clap(long, hide = true)]
6365
as_include: bool,

0 commit comments

Comments
 (0)