File tree Expand file tree Collapse file tree 4 files changed +12
-9
lines changed Expand file tree Collapse file tree 4 files changed +12
-9
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " polyapi" ,
3- "version" : " 0.24.6 " ,
3+ "version" : " 0.24.7 " ,
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 @@ -162,13 +162,16 @@ export const prepareDeployables = async (
162162 ) ;
163163 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' , '' ) ;
165167 for ( const deployable of dirtyDeployables ) {
166168 try {
167- if ( staged . includes ( deployable . file ) ) {
168- shell . echo ( `Staging ${ deployable . file } ` ) ;
169- shell . exec ( `git add ${ deployable . file } ` ) ;
169+ const deployableName = deployable . file . replace ( `${ rootPath } /` , '' ) ;
170+ if ( staged . includes ( deployableName ) ) {
171+ shell . echo ( `Staging ${ deployableName } ` ) ;
172+ shell . exec ( `git add ${ deployableName } ` ) ;
170173 }
171- }
174+ }
172175 catch ( error ) {
173176 console . warn ( error ) ;
174177 }
Original file line number Diff line number Diff line change @@ -183,7 +183,7 @@ export const getAllDeployableFilesWindows = ({
183183 const excludeCommand = excludePattern
184184 ? ` | findstr /V /I "${ excludePattern } "`
185185 : '' ;
186- const searchCommand = ` | findstr /M /I /S / F:/ ${ pattern } *.* ` ;
186+ const searchCommand = ` | findstr /M /I /F:/ ${ pattern } ` ;
187187
188188 let result : string [ ] = [ ] ;
189189 for ( const dir of includeDirs ) {
@@ -195,7 +195,7 @@ export const getAllDeployableFilesWindows = ({
195195 : includeFilesOrExtensions
196196 . map ( ( f ) => ( f . includes ( '.' ) ? f : `${ dir } *.${ f } ` ) )
197197 . join ( ' ' ) ;
198- const dirCommand = `dir ${ includePattern } /S /P /B > NUL ` ;
198+ const dirCommand = `dir ${ includePattern } /S /P /B ` ;
199199 const fullCommand = `${ dirCommand } ${ excludeCommand } ${ searchCommand } ` ;
200200 try {
201201 const output = shell . exec ( fullCommand , { silent :true } ) . toString ( 'utf8' ) ;
You can’t perform that action at this time.
0 commit comments