Skip to content

Commit

Permalink
Merge pull request #814 from Shopify/fix-780
Browse files Browse the repository at this point in the history
Add 'wdm' to bundled CLI 2.x Gemfile
  • Loading branch information
Arkham committed Dec 8, 2022
2 parents 9281540 + 44daa1c commit 8b7663a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
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', '>= 0.1.0'")
}
await file.write(gemPath, gemFileContent.join('\n'))
}

async function createThemeCheckGemfile() {
Expand Down

0 comments on commit 8b7663a

Please sign in to comment.