File tree Expand file tree Collapse file tree 4 files changed +15
-3
lines changed
src/Support/Support.Autorest Expand file tree Collapse file tree 4 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -62,15 +62,15 @@ directive:
6262 properties :
6363 - DisplayName
6464 - Name
65- - SecondaryConsentEnabled # Do we need this?
65+ - SecondaryConsentEnabled
6666 - where :
6767 model-name : Service
6868 set :
6969 format-table :
7070 properties :
7171 - DisplayName
7272 - Name
73- - ResourceType # Do we need this?
73+ - ResourceType
7474 - where :
7575 model-name : FileDetails
7676 set :
@@ -81,6 +81,12 @@ directive:
8181 - ChunkSize
8282 - FileSize
8383 - NumberOfChunks
84+ - where :
85+ verb : New
86+ subject : FileWorkspacesNoSubscription
87+ parameter-name : FileWorkspaceName
88+ set :
89+ alias : Name
8490 - where :
8591 verb : New
8692 subject : File
Original file line number Diff line number Diff line change @@ -133,6 +133,9 @@ process {
133133 $MaxChunkSize = 2.5 * 1024 * 1024 # 2.5 MB
134134 $MaxFileSize = 5 * 1024 * 1024 # 5 MB
135135 $FileContentBytes = Get-Content - Path $FilePath - Raw
136+ if ($FileContentBytes -eq $Null ){
137+ throw " File cannot be empty"
138+ }
136139 $FileContentByteArray = [System.Text.Encoding ]::UTF8.GetBytes($FileContentBytes )
137140 $FileSize = $FileContentByteArray.Length
138141 if ($FileSize -gt $MaxFileSize ){
Original file line number Diff line number Diff line change @@ -126,6 +126,9 @@ process {
126126 $MaxChunkSize = 2.5 * 1024 * 1024 # 2.5 MB
127127 $MaxFileSize = 5 * 1024 * 1024 # 5 MB
128128 $FileContentBytes = Get-Content - Path $FilePath - Raw
129+ if ($FileContentBytes -eq $Null ){
130+ throw " File cannot be empty"
131+ }
129132 $FileContentByteArray = [System.Text.Encoding ]::UTF8.GetBytes($FileContentBytes )
130133 $FileSize = $FileContentByteArray.Length
131134 if ($FileSize -gt $MaxFileSize ){
Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ File workspace name.
6868` ` ` yaml
6969Type : System.String
7070Parameter Sets : (All)
71- Aliases :
71+ Aliases : Name
7272
7373Required : True
7474Position : Named
You can’t perform that action at this time.
0 commit comments