File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -702,11 +702,14 @@ impl Context {
702
702
// the logs is just confusing noise. Any authentication/permission error will be
703
703
// encountered at the upload stage anyway.
704
704
. stderr ( Stdio :: null ( ) ) ) ;
705
- let if_none_match = match get {
706
- Ok ( output) => serde_json:: from_slice :: < GetResult > ( & output. stdout ) ?. etag ,
705
+ let ( conditional_header, conditional_value) = match get {
706
+ Ok ( output) => (
707
+ "--if-match" ,
708
+ serde_json:: from_slice :: < GetResult > ( & output. stdout ) ?. etag ,
709
+ ) ,
707
710
// If the GET failed assume the file doesn't exist, and we need to upload a new one.
708
711
// Setting the If-None-Match header to * will fail the request if the file exists.
709
- Err ( _) => " *". to_string ( ) ,
712
+ Err ( _) => ( "--if-none-match" , " *". to_string ( ) ) ,
710
713
} ;
711
714
712
715
let upload_addr = self
@@ -731,7 +734,7 @@ impl Context {
731
734
. args ( [ "--key" , "manifests.txt" ] )
732
735
// Fail the request if the manifest was already modified by something else (for
733
736
// example, another release running in parallel).
734
- . args ( [ "--if-none-match" , & if_none_match ] ) ) ?;
737
+ . args ( [ conditional_header , & conditional_value ] ) ) ?;
735
738
736
739
Ok ( ( ) )
737
740
}
You can’t perform that action at this time.
0 commit comments