cache icon indicating copy to clipboard operation
cache copied to clipboard

New option to create `path`

Open szepeviktor opened this issue 3 years ago • 6 comments

Currently mkdir -p $cache_path should be issued to create directory specified in path. cache does not create the path directory if it doesn't exist. https://github.com/szepeviktor/Valinor/runs/7272413993?check_suite_focus=true

Please consider adding a "create_directory": true option to create directory specified in path. Thank you!!

szepeviktor avatar Jul 10 '22 18:07 szepeviktor

Hey @szepeviktor 👋🏽 The directory creation should happen at build time, and should be created by the build program itself. Can you please specify why you would want a new directory to be specifically created?

kotewar avatar Jul 11 '22 05:07 kotewar

@szepeviktor, would you like to share the use case for this suggestion so that we can prioritise it?

kotewar avatar Aug 17 '22 11:08 kotewar

@kotewar On the very first run the cache is empty and many tools do not autocreate directories, mainly sub-subdirectories. And these tools are failing because of the non-existent directory structure.

szepeviktor avatar Aug 17 '22 11:08 szepeviktor

Thanks for bringing this up @szepeviktor.

Can you please share these tools as well so that we can use the same for testing the behaviour and make the necessary fixes?

kotewar avatar Aug 17 '22 11:08 kotewar

Okay. I respond within a day.

szepeviktor avatar Aug 17 '22 11:08 szepeviktor

https://github.com/CuyZ/Valinor/blob/master/infection.json.dist#L8 Using a non-existent temporary directory for infection/infection causes an error.

So one needs to issue mkdir -p var/cache before actions/cache

szepeviktor avatar Aug 17 '22 15:08 szepeviktor

How about using shell:bash to do this job for you?

Currently we haven't received much requests in this area, but this can be achieved using custom shell commands to achieve this folder creation.

kotewar avatar Nov 22 '22 04:11 kotewar

Thank you. I'm into solutions, not work-arounds.

szepeviktor avatar Nov 22 '22 08:11 szepeviktor

Vcpkg does this too with its binary cache. Will only use an existing directory.

VCPKG_DEFAULT_BINARY_CACHE

fquinner avatar Dec 01 '22 10:12 fquinner

This issue is stale because it has been open for 200 days with no activity. Leave a comment to avoid closing this issue in 5 days.

github-actions[bot] avatar Jan 03 '24 08:01 github-actions[bot]

This issue was closed because it has been inactive for 5 days since being marked as stale.

github-actions[bot] avatar Jan 09 '24 08:01 github-actions[bot]