Skip to content

Train doesn't create a login shell #148

Closed
@jonathanmorley

Description

@jonathanmorley
require 'train'

train = Train.create('ssh', host: '127.0.0.1', port: 2200, user: 'vagrant', password: 'vagrant')
conn = train.connection
puts conn.run_command("shopt -q login_shell && echo 'Login shell' || echo 'Not login shell'").stdout

Expected output Login shell
Actual output Not login shell

Since train 'logs in' to the remote host, and then runs commands against them, I would expect the resulting shells to be login shells.

I think a login parameter should be added to somehow force train to create a login shell (defaulted to false for backwards compatibility).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions