Pkg.add syntax

I try to get rid of the warning I get when executing in a script:

julia -e "using Pkg; pkg\"add KiteSimulators#main\" "

Not working:

julia -e "using Pkg; pkg.add(\"KiteSimulators\", rev=\"main\")

Any idea?

What’s the warning?

Sorry, false alarm. I had to change it to:

julia -e "using Pkg; Pkg.update(); pkg.add(\"KiteSimulators\", rev=\"main\")

Now it works.

The warning was:

┌ Warning: The Pkg REPL mode is intended for interactive use only, and should not be used from scripts. It is recommended to use the functional API instead.