#One liner to open "magic shell" + "magic build"

17 messages · Page 1 of 1 (latest)

supple aspen
#

I am having issues with the magic. I want to programmatically and directly pipe build command into it. But I just loose my TTY. I tried a bunch of things but does not get it to work. Doing these commands manually might be alright when there is not much to be built but I would really like to know if you guys have a solution for this.

novel smeltBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

worn helm
#

Nobody wants to deal with entering virtual environments in a CI pipeline or similar automated build environments, so this is the recommended solution.

#

If you need more than fits in a single line, you can execute a bash script to run whatever you need.

supple aspen
#

Oh, this is just what I need. THank you 🙂

novel smeltBOT
novel smeltBOT
supple aspen
#

I am not getting it to work. I can run normal shell commands and scripts. But when I try to do "mojo build test.mojo" it does not recognize mojo like it is being run outside magic shell

worn helm
supple aspen
#

Yes, that is what I tried to do: [tasks]
build = "mojo build /home/magic_user/app/src/test.mojo"
magic run build
mojo: command not found

Available tasks:
build

worn helm
#

Can you post the whole file?

worn helm
#

If I had to guess, it's defaulting to pixi.toml.

#

Try removing that file.

#

You only need one of them.

supple aspen
#

Yes, using only mojoproject.toml works 🙂