File tree Expand file tree Collapse file tree 4 files changed +13
-18
lines changed Expand file tree Collapse file tree 4 files changed +13
-18
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " polyapi" ,
3- "version" : " 0.24.3 " ,
3+ "version" : " 0.24.4 " ,
44 "description" : " Poly is a CLI tool to help create and manage your Poly definitions." ,
55 "license" : " MIT" ,
66 "repository" : {
Original file line number Diff line number Diff line change @@ -160,16 +160,13 @@ export const prepareDeployables = async (
160160 writeUpdatedDeployable ( deployable , disableDocs ) ,
161161 ) ,
162162 ) ;
163- const staged = shell . exec ( 'git diff --name-only --cached' )
163+ const staged = shell . exec ( 'git diff --name-only --cached' , { silent : true } )
164164 . toString ( ) . split ( '\n' ) . filter ( Boolean ) ;
165- const rootPath : string = shell . exec ( 'git rev-parse --show-toplevel' , { silent :true } )
166- . toString ( 'utf8' ) . replace ( '\n' , '' ) ;
167165 for ( const deployable of dirtyDeployables ) {
168166 try {
169- const deployableName = deployable . file . replace ( `${ rootPath } /` , '' ) ;
170- if ( staged . includes ( deployableName ) ) {
171- shell . echo ( `Staging ${ deployableName } ` ) ;
172- shell . exec ( `git add ${ deployableName } ` ) ;
167+ if ( staged . includes ( deployable . file ) ) {
168+ shell . echo ( `Staging ${ deployable . file } ` ) ;
169+ shell . exec ( `git add ${ deployable . file } ` ) ;
173170 }
174171 }
175172 catch ( error ) {
Original file line number Diff line number Diff line change @@ -177,15 +177,13 @@ export const getAllDeployableFilesWindows = ({
177177 . join ( ' ' ) : '' ;
178178 const pattern =
179179 typeNames . length > 0
180- ? typeNames . map ( ( name ) => `\\< polyConfig: ${ name } \\> ` ) . join ( ' ' )
181- : 'polyConfig' ;
180+ ? typeNames . map ( ( name ) => `/C:" polyConfig: ${ name } " ` ) . join ( ' ' )
181+ : 'C/:" polyConfig" ' ;
182182
183- // Using two regular quotes or two smart quotes throws "The syntax of the command is incorrect".
184- // For some reason, starting with a regular quote and leaving the end without a quote works.
185183 const excludeCommand = excludePattern
186- ? ` | findstr /V /I "${ excludePattern } `
184+ ? ` | findstr /V /I "${ excludePattern } " `
187185 : '' ;
188- const searchCommand = ` | findstr /M /I /F:/ ${ pattern } ` ;
186+ const searchCommand = ` | findstr /M /I /S / F:/ ${ pattern } *.* ` ;
189187
190188 let result : string [ ] = [ ] ;
191189 for ( const dir of includeDirs ) {
@@ -197,10 +195,10 @@ export const getAllDeployableFilesWindows = ({
197195 : includeFilesOrExtensions
198196 . map ( ( f ) => ( f . includes ( '.' ) ? f : `${ dir } *.${ f } ` ) )
199197 . join ( ' ' ) ;
200- const dirCommand = `dir ${ includePattern } /S /P /B` ;
198+ const dirCommand = `dir ${ includePattern } /S /P /B > NUL ` ;
201199 const fullCommand = `${ dirCommand } ${ excludeCommand } ${ searchCommand } ` ;
202200 try {
203- const output = shell . exec ( fullCommand ) . toString ( 'utf8' ) ;
201+ const output = shell . exec ( fullCommand , { silent : true } ) . toString ( 'utf8' ) ;
204202 result = result . concat ( output . split ( / \r ? \n / ) . filter ( Boolean ) ) ;
205203 } catch { }
206204 }
You can’t perform that action at this time.
0 commit comments