question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fix install issues with craft install command

See original GitHub issue

So there is a slight issue with the craft install command. Sometimes you get a permission issue when installing dependencies. I think it’s because of how Masonite is first installed.

I think installing masonite-cli as a user will require installing the dependencies as a user.

So what we need is a command like this:

$ craft install --user

which will run pip3 install --user -r requirements.txt.

We just need to add a flag to the command and then append that flag.

Steps

This really just entails adding an option to the command:

....
    install
        {--u|user : Install dependencies for the current user only}
    """

and then in the code so something like:

....
if self.option('user'):
    user = '--user'
else:
    user = ''

call(["pip3", "install", "{}".format(user), "-r", "requirements.txt"])
....

this will be in the Masoniteframework/craft repository

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
nioperas06commented, Jun 22, 2018

Yeah, @MichaelYusko you can go for it. 👍 I’ll find something to do 😄

1reaction
myuskocommented, Jun 22, 2018

@josephmancuso If @nioperas06 won’t take the ticket, I’ll happy to work on. So it would be a cool start, because I planning to contribute into the core package.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting a Failed Craft Installation
If that's the case, Craft probably isn't installed yet so you'll need to visit the installer URL at /index.php?p=admin/install or /admin/install .
Read more >
"Craft isn't installed yet" error after updating to Craft 3.1
If you work in MAMP environment and have this error message, check if your PHP and MySQL are available from command line (Terminal)....
Read more >
craft setup (command line) states I already have installed
I'm following the instructions on the docs. I've run composer create-project craftcms/craft . inside my directory. It finishes and generates ...
Read more >
Craft Calendar 3.x - Installing & Updating
Installing from the Terminal. Calendar can also be installed manually through Composer: Open your terminal and go to your Craft project: cd ...
Read more >
Updating Craft CMS Without Headaches
If you're wondering what the @php craft install/check is here, it's a way for the commands to fail gracefully if Craft CMS isn't...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found