Sha256: 968a1f0db7e69c63fd03a112d9d37eae6715964accb29c2dbf8f0a66100ee3c3

Contents?: true

Size: 636 Bytes

Versions: 1

Compression:

Stored size: 636 Bytes

Contents

module ProconBypassMan
  module RemotePbmAction
    class ChangePbmVersionAction < BaseAction

      def action_content(args: )
        require "pbmenv"
        ProconBypassMan.logger.info "execute ChangePbmVersionAction!"
        pbm_version = args["pbm_version"] or raise(ProconBypassMan::RemotePbmAction::NeedPbmVersionError, "pbm_versionが必要です, #{args.inspect}")
        Pbmenv.install(pbm_version)
        Pbmenv.use(pbm_version)
        `reboot` # symlinkの参照先が変わるのでrebootする必要がある
      end

      private

      def before_action_callback
        be_processed
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
procon_bypass_man-0.1.14 lib/procon_bypass_man/remote_pbm_action/change_pbm_version_action.rb