Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deleting _grisp folder doesn't reextract OTP #9

Open
LostKobrakai opened this issue Feb 23, 2022 · 5 comments
Open

Deleting _grisp folder doesn't reextract OTP #9

LostKobrakai opened this issue Feb 23, 2022 · 5 comments

Comments

@LostKobrakai
Copy link

The source of the issue seems to be here:

extract(#{package := #{state := downloaded, file := File}} = State0) ->
#{paths := #{install := InstallPath}} = State0,
State1 = event(State0, [{start, File}]),
case erl_tar:extract(File, [compressed, {cwd, InstallPath}]) of
ok -> event(State1, [done]);
{error, Reason} -> event(State1, [{error, Reason}])
end;
extract(State0) ->
event(State0, ['_skip']).

@peerst
Copy link
Member

peerst commented Feb 25, 2022

Do you have the exact steps to reproduce this for us, please?

@LostKobrakai
Copy link
Author

  • Create grisp project
  • Run rebar3 grisp deploy -n test_grisp -v 0.1.0
  • Delete _grisp folder in the project
  • Run rebar3 grisp deploy -n test_grisp -v 0.1.0 again

@peerst
Copy link
Member

peerst commented Feb 25, 2022

Ah cool, easy to reproduce. Thanks for the quick response

@sylane
Copy link
Contributor

sylane commented Feb 25, 2022

Could you give your rebar.config ?

@LostKobrakai
Copy link
Author

{deps, [grisp]}.

{erl_opts, [debug_info]}.

{plugins, [rebar3_grisp]}.

{grisp, [
    {otp, [
        {version, "23"}
    ]},
    {deploy, [
        {destination, "tmp/sd_card"}

        % Shell script to run before deploying begins
        % {pre_script, "rm -rf tmp/sd_card/*"}

        % Shell script to run after deploying has finished
        % {post_script, "umount tmp/sd_card"}
    ]}
]}.

{shell, [{apps, []}]}.

{relx, [
    {release, {test_grisp, "0.1.0"}, [test_grisp]}
]}.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants