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

add ~env_export to assert_command #41

Open
gildor478 opened this issue Oct 24, 2020 · 0 comments
Open

add ~env_export to assert_command #41

gildor478 opened this issue Oct 24, 2020 · 0 comments

Comments

@gildor478
Copy link
Owner

This feature request has been migrated from artifact #1150 on forge.ocamlcore.org. It was assigned to user102.

user102 posted on 2012-05-09 23:03:09:

Something that allow to really export like in standard sh:

   let env_export nm vl env =
     let replaced = ref false in
       for i = 0 to Array.length env - 1 do
         if OASISString.starts_with ~what:(nm^"=") env.(i) then
           begin
             env.(i) <- nm^"="^vl;
             replaced := true
           end
       done;
       if not !replaced then
         Array.append env [|nm^"="^vl|]
       else
         env
   in
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant