@@ -61,19 +61,19 @@ func GetNewPaths(paths []string, fullPath bool, rootPath string) []string {
6161 return paths
6262}
6363
64- func getDefaultPath (fullPath bool ) []string {
64+ func getDefaultPath (fullPath bool , rootPath string ) []string {
6565 var paths []string
6666
6767 if ! fullPath {
6868 fullPath := filepath .Join (env .GetCurrentDir (), consts .FolderDependencies , consts .DcpFolder )
6969
70- dir , err := filepath .Rel (env . GetCurrentDir () , fullPath )
70+ dir , err := filepath .Rel (rootPath , fullPath )
7171 if err == nil {
7272 paths = append (paths , dir )
7373 }
7474
7575 fullPath = filepath .Join (env .GetCurrentDir (), consts .FolderDependencies , consts .DcuFolder )
76- dir , err = filepath .Rel (env . GetCurrentDir () , fullPath )
76+ dir , err = filepath .Rel (rootPath , fullPath )
7777 if err == nil {
7878 paths = append (paths , dir )
7979 }
@@ -119,7 +119,7 @@ func getNewPathsFromDir(path string, paths []string, fullPath bool, rootPath str
119119 return nil
120120 })
121121
122- for _ , path := range getDefaultPath (fullPath ) {
122+ for _ , path := range getDefaultPath (fullPath , rootPath ) {
123123 if ! utils .Contains (paths , path ) {
124124 paths = append (paths , path )
125125 }
0 commit comments