Sha256: 5ed70041c0626a8153e3943cd53e84487ef408bf6bbae8853a5dde93ebf3b661

Contents?: true

Size: 711 Bytes

Versions: 4

Compression:

Stored size: 711 Bytes

Contents

module VagrantPlugins
  module SyncedFolderNFSGuest
    module Cap
      module Linux
        class ReadUserIDs
          def self.read_uid(machine)
            command = "id -u"
            result  = ""
            machine.communicate.execute(command) do |type, data|
              result << data if type == :stdout
            end

            result.chomp.split("\n").first
          end

          def self.read_gid(machine)
            command = "id -g"
            result  = ""
            machine.communicate.execute(command) do |type, data|
              result << data if type == :stdout
            end

            result.chomp.split("\n").first
          end
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
vagrant-nfs_guest-0.0.4 lib/vagrant-nfs_guest/cap/linux/read_user_ids.rb
vagrant-nfs_guest-0.0.3 lib/vagrant-nfs_guest/cap/linux/read_user_ids.rb
vagrant-nfs_guest-0.0.2 lib/vagrant-nfs_guest/cap/linux/read_user_ids.rb
vagrant-nfs_guest-0.0.1 lib/vagrant-nfs_guest/cap/linux/read_user_ids.rb