Skip to content

Commit

Permalink
Add new version for cuemod init sub command
Browse files Browse the repository at this point in the history
Signed-off-by: Santosh Kaluskar <ksantosh@intelops.dev>
  • Loading branch information
santoshkal committed Apr 4, 2024
1 parent bacf957 commit 7830626
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 26 deletions.
6 changes: 0 additions & 6 deletions cmd/cuemod_init.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,6 @@ func runInitCmd(cmd *cobra.Command, args []string) error {
log.Errorf("Error initializing workspace files %s: %v", initArgs.tool, err)
return err
}
// extractPath := filepath.Join(workspacePath, "extracted_content")
// err = os.Mkdir(extractPath, 0755)
// if err != nil {
// log.Errorf("Error creating workspace files for %s: %v", desiredTool, err)
// return err
// }

reader, err := os.Open(tarballPath)
if err != nil {
Expand Down
20 changes: 0 additions & 20 deletions pkg/cuecore/cueUtils.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,26 +88,6 @@ func CheckTagAndPullArchive(url, tool string, archivePath *os.File) error {
return nil
}

// func CreateWorkspace(tool string) (string, error) {
// path := filepath.Join("./source", tool)
// // path := "./source"
// dir := filepath.Dir(path)
// if _, err := os.Stat(dir); os.IsNotExist(err) {
// err := os.MkdirAll(dir, 0755) // Create parent directories if they don't exist
// if err != nil {
// return "", fmt.Errorf("error creating workspace: %v", err)
// }
// }

// if _, err := os.Stat(path); os.IsNotExist(err) {
// err := os.Mkdir(path, 0755)
// if err != nil {
// return "", fmt.Errorf("error initializing workspace: %v", err)
// }
// }
// return path, nil
// }

func CreateArchiveWorkspace(tool string) (string, error) {
path := filepath.Join(tool, "archive")
dir := filepath.Dir(path)
Expand Down

0 comments on commit 7830626

Please sign in to comment.