Skip to content

Default config effectively wipes downloaded binaries on every Start #154

@logan

Description

@logan

The first call to Start takes a long time, because it has to download and extract binaries. The second call to Start should be faster, because it can skip the download and extraction. However, in practice, unless you set BinariesPath on the config, Start downloads and extracts every time.

The reason why is here:

	if ep.config.runtimePath == "" {
		ep.config.runtimePath = filepath.Join(filepath.Dir(cacheLocation), "extracted")
	}

	if ep.config.dataPath == "" {
		ep.config.dataPath = filepath.Join(ep.config.runtimePath, "data")
	}

	if err := os.RemoveAll(ep.config.runtimePath); err != nil {
		return fmt.Errorf("unable to clean up runtime directory %s with error: %s", ep.config.runtimePath, err)
	}

	if ep.config.binariesPath == "" {
		ep.config.binariesPath = ep.config.runtimePath
	}

In the default config, all paths are "". So, we end up putting downloaded-and-extracted binaries under the runtime path. But, first, we delete everything under the runtime path.

This is probably a duplicate of #141.

I recommend a different default location for binaries.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions