Skip to content
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

Add 'wdm' to bundled CLI 2.x Gemfile #814

Merged
merged 3 commits into from
Dec 8, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/bright-bulldogs-mix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@shopify/cli-kit': minor
---

Add 'wdm' to bundled CLI 2.x Gemfile
9 changes: 8 additions & 1 deletion packages/cli-kit/src/public/node/ruby.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {glob, join} from '../../path.js'
import constants from '../../constants.js'
import {AdminSession} from '../../session.js'
import {content, token} from '../../output.js'
import {platformAndArch} from '../../os.js'
import {AbortSignal} from 'abort-controller'
import {Writable} from 'node:stream'

Expand Down Expand Up @@ -243,7 +244,13 @@ function createThemeCheckCLIWorkingDirectory() {

async function createShopifyCLIGemfile() {
const gemPath = join(shopifyCLIDirectory(), 'Gemfile')
await file.write(gemPath, `source 'https://rubygems.org'\ngem 'shopify-cli', '${RubyCLIVersion}'`)
const gemFileContent = ["source 'https://rubygems.org'", `gem 'shopify-cli', '${RubyCLIVersion}'`]
const {platform} = platformAndArch()
if (platform === 'windows') {
// 'wdm' is required by 'listen', see https://github.com/Shopify/cli/issues/780
gemFileContent.push("gem 'wdm'")
karreiro marked this conversation as resolved.
Show resolved Hide resolved
}
await file.write(gemPath, gemFileContent.join('\n'))
}

async function createThemeCheckGemfile() {
Expand Down