File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 18
18
- Additional information about change #1
19
19
-->
20
20
## Upcoming Release
21
+ * Fix bug where parameters could not be set to false for ` Publish-AzWebApp `
21
22
22
23
## Version 3.2.1
23
24
* Introduced secrets detection feature to safeguard sensitive data.
Original file line number Diff line number Diff line change @@ -119,33 +119,34 @@ public override void ExecuteCmdlet()
119
119
120
120
paramValues . Add ( "path" , TargetPath ) ;
121
121
122
+ // Purposely using IsParameterBound to check if the parameter is passed or not. In this case we want to return true if $false is passed.
123
+ // We only want to set the parameter if a value is passed.
122
124
// default async to true if not provided to match old behavior
123
- if ( Async . IsPresent )
125
+ if ( this . IsParameterBound ( c => c . Async ) )
124
126
{
125
127
paramValues . Add ( "async" , Async . ToString ( ) ) ;
126
128
}
127
-
128
129
else
129
130
{
130
131
paramValues . Add ( "async" , "true" ) ;
131
132
}
132
133
133
- if ( Restart . IsPresent )
134
+ if ( this . IsParameterBound ( c => c . Restart ) )
134
135
{
135
136
paramValues . Add ( "restart" , Restart . ToString ( ) ) ;
136
137
}
137
138
138
- if ( Clean . IsPresent )
139
+ if ( this . IsParameterBound ( c => c . Clean ) )
139
140
{
140
141
paramValues . Add ( "clean" , Clean . ToString ( ) ) ;
141
142
}
142
143
143
- if ( IgnoreStack . IsPresent )
144
+ if ( this . IsParameterBound ( c => c . IgnoreStack ) )
144
145
{
145
146
paramValues . Add ( "ignorestack" , IgnoreStack . ToString ( ) ) ;
146
147
}
147
148
148
- if ( Reset . IsPresent )
149
+ if ( this . IsParameterBound ( c => c . Reset ) )
149
150
{
150
151
paramValues . Add ( "reset" , Reset . ToString ( ) ) ;
151
152
}
You can’t perform that action at this time.
0 commit comments