File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
sample-projects/sample-node-project/building Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -243,7 +243,12 @@ func IsDb(path string) bool {
243243
244244// check for the `build` folder
245245func IsBuildFolder (path string ) bool {
246- if strings .Contains (path , string (os .PathSeparator )+ "build" ) {
246+ // checks for the "build" folder itself, i.e. for a path that ends with `/build`
247+ // ... or for files within the "build" folder, i.e. for a path that contains `/build/`
248+ buildFolderPath := string (os .PathSeparator ) + "build"
249+ fileInBuildFolderPath := buildFolderPath + string (os .PathSeparator )
250+
251+ if strings .HasSuffix (path , buildFolderPath ) || strings .Contains (path , fileInBuildFolderPath ) {
247252 if ! didPrintBuildMsg {
248253 log .Info ("\t Ignoring `build` folder" )
249254 didPrintBuildMsg = true
@@ -288,6 +293,8 @@ func IsIdeFolder(path string) bool {
288293 idePaths := [2 ]string {".vscode" , ".idea" }
289294
290295 for _ , element := range idePaths {
296+ // NOTE: This check should be fine using "Contains" because I don't expect these IDE folder names to be used for
297+ // anything useful (i.e., I don't anticipate a folder name with ".idea" in its name to contain anything useful)
291298 if strings .Contains (path , string (os .PathSeparator )+ element ) {
292299 if ! didPrintIdesMsg {
293300 log .Info ("\t Ignoring IDE folder (such as .code, .idea)" )
You can’t perform that action at this time.
0 commit comments