Add xdg-utils package to shopify-cli feature install script - #92
Conversation
|
Would I need to bump the version number in |
|
Yeah, please bump the version to |
|
That's now done 👍 |
koralowiec
left a comment
There was a problem hiding this comment.
Looks fine. Indeed it seems that we cannot test it without having a store for that, so we can skip adding a test scenario
However, could you please add a test scenario with mcr.microsoft.com/devcontainers/base:alpine as the base image?
So something like this to scenarios.json:
"test_alpine": {
"image": "mcr.microsoft.com/devcontainers/base:alpine",
"features": {
"shopify-cli": {}
}
}And test_alpine.sh:
#!/usr/bin/env bash
set -e
source dev-container-features-test-lib
check "shopify --version" shopify --version
reportResults
|
Just as a quick update, the test_alpine scenario is failing, so I'll take a look into it. On first glance, it looks like nanolayer is trying to call apt-get, which Alpine can't do: |
|
It seems that the problem isn't your change, but the $nanolayer_location \
install \
devcontainer-feature \
"ghcr.io/devcontainers-extra/features/npm-package:1.0.3" \
--option package='@shopify/cli' --option version="$VERSION"
$nanolayer_location \
install \
devcontainer-feature \
"ghcr.io/devcontainers-extra/features/npm-package:1.0.3" \
--option package='@shopify/theme' --option version="$VERSION"https://github.com/devcontainers-extra/features/blob/main/src/npm-package/install.sh - It doesn't support Alpine Linux I think that in this case we should get rid of this elif [ -x "/sbin/apk" ] ; then
$nanolayer_location \
install \
apk \
"xdg-utils"Let's keep only |
|
Thanks for taking a look! I was coming to a similar conclusion with the npm-package |
Currently, the npm-package feature doesn't support Alpine, so this check has been removed for now.
|
That's now removed 👍 |
|
I use Shopify (hence the need for the feature!) so can post the test results of a scenario using one of our stores, if that will help. |
|
No need for that, based on the issue you linked installing |
|
FYI: The updated feature will be available once the Release workflow deploys it |
|
I can confirm that with the inclusion of this feature in release, that it works as intended :) Thanks again! |
|
Great to hear, thanks for providing the fix in your PR! 🥇 |
Shopify CLI has a dependency on xdg-open (as part of xdg-utils) in order to authenticate.
After inspecting the nanolayer source code, I discovered that it had an install command that can install apt-get and apk packages.
This pull request will install xdg-utils in the setup process.
I've opted for using the apt-get and apk check from
library_scripts.shrather than using theghcr.io/devcontainers-extra/features/apt-get-packagesfeature because I don't want to create a limitation on apt-get.See related issues:
I created a test scenario locally, adapted from the scenario already committed from the author of the feature, but haven't included it in this commit because it requires a parameter value that could be deemed as personal info. It doesn't appear that Shopify has a public development store to run this against - or if there is, I couldn't find one.
The check needed would have been:
check "shopify theme list" shopify theme list --store your_store_name