Skip to content

Commit e7ac985

Browse files
committed
Handle :inertia_version options that return either single or multiple versions
1 parent cf31fb1 commit e7ac985

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/generators/inertia/install/install_generator.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ def vite_tag
265265

266266
def inertia_resolved_version
267267
@inertia_resolved_version ||= Gem::Version.new(
268-
`npm show @inertiajs/core@#{options[:inertia_version]} version`.strip
268+
`npm show @inertiajs/core@#{options[:inertia_version]} version --json | tail -n2 | head -n1 | tr -d '", '`.strip
269269
)
270270
end
271271

0 commit comments

Comments
 (0)