-
Notifications
You must be signed in to change notification settings - Fork 8
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
[MultipleFixes] Fixed init-drupal
for composer's memory-limit-errors and init-lando
for FileNotFoundError
#4
Conversation
init-drupal
errorsinit-drupal
for composer's memory-limit-errors and init-lando
for FileNotFoundError
@@ -88,7 +88,9 @@ def main( | |||
|
|||
if not no_install: | |||
if shutil.which("composer") is not None: | |||
os.system("composer install -o") | |||
status = os.system("composer install -o") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if we can use
status = os.system("export COMPOSER_MEMORY_LIMIT=-1; composer install -o")
to set composer environment variable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shinde-rahul, I think it's better to run init-drupal
with the variable set. For example, for bash
COMPOSER_MEMORY_LIMIT=-1 init-drupal --directory=d8 --core=core my/site
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It'll be easier to review and merge multiple PRs here rather than just one. Do you mind looking at feedback here and creating them in separate PRs?
@@ -88,7 +88,9 @@ def main( | |||
|
|||
if not no_install: | |||
if shutil.which("composer") is not None: | |||
os.system("composer install -o") | |||
status = os.system("composer install -o") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shinde-rahul, I think it's better to run init-drupal
with the variable set. For example, for bash
COMPOSER_MEMORY_LIMIT=-1 init-drupal --directory=d8 --core=core my/site
axltempl/drupal.py
Outdated
@@ -98,7 +100,7 @@ def main( | |||
name = name.split("/") | |||
name = name[1] if len(name) == 2 else name[0] | |||
util.writeInfo("Adding Lando support...") | |||
lando.generateLandoFiles(name, docroot, cache) | |||
lando.generateLandoFile(name, docroot, cache) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shinde-rahul, I'll still keep it plural as there are multiple files to be generated here, not just one.
axltempl/lando.py
Outdated
@@ -56,6 +56,20 @@ def generateLandoFiles(name, docroot, cache): | |||
os.mkdir(".lando") | |||
util.copyPackageFile("files/lando/php.ini", ".lando/php.ini") | |||
|
|||
# Generate lando development override configuration. | |||
generateLandoDevelopmentSettingsFiles(docroot, cache) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shinde-rahul, any value in this new function? I mean, is there a scenario where we would just call this function and not generateLandoFiles
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merging both the functions. This function was called from drupal.py, which is not the case now and do see any call for this.
Closing this PR and the created following two PR's to review,
|
Fixes #4: Set the default directory based on the package name
The PR changes fix for,
composer install -o
errorcomposer init-lando
error