Public bug reported:
Overview
=======
When running /usr/bin/vim-addon-manager in a non-login shell, users receive a
ruby error and are unable to use the program
Expected Result
=============
vim-addon-manager should be able to run normally within a non-login shell and
perform requested alterations
Actual Result
===========
Users receive the following error message from ruby:
/usr/bin/vim-addon-manager:202:in `getpwnam': no implicit conversion of nil
into String (TypeError)
from /usr/bin/vim-addon-manager:202:in `parse_cmdline'
from /usr/bin/vim-addon-manager:252:in `<main>'
Steps to reproduce
===============
I was able to reproduce the error with the following ruby script:
test.rb:
#!/usr/bin/env ruby
require "open3"
Open3.popen3("/usr/bin/vim-addon-manager install puppet") do | stdin, stdout,
stderr, wait_thr|
puts "stdout: " + stdout.read
puts "sderr: " + stderr.read
end
When I executed it with:
env -i ruby test.rb
Why this is a problem
=================
I would like to be able to be able to run the vim-addon-manager command from
within puppet using an exec resource, so the vim-addon-manager command must be
able to run in a clean environment without a login shell. The same conditions
probably apply if you wanted to run the script from other systems such as chef,
cron, etc.
ProblemType: Bug
DistroRelease: Ubuntu 15.10
Package: vim-addon-manager 0.5.4
ProcVersionSignature: Ubuntu 4.2.0-16.19-generic 4.2.3
Uname: Linux 4.2.0-16-generic x86_64
NonfreeKernelModules: wl
ApportVersion: 2.19.1-0ubuntu4
Architecture: amd64
CurrentDesktop: XFCE
Date: Thu Nov 5 22:13:38 2015
EcryptfsInUse: Yes
InstallationDate: Installed on 2014-09-23 (407 days ago)
InstallationMedia: Xubuntu 14.04 LTS "Trusty Tahr" - Release amd64 (20140416.2)
PackageArchitecture: all
SourcePackage: vim-addon-manager
UpgradeStatus: Upgraded to wily on 2015-10-24 (12 days ago)
** Affects: vim-addon-manager (Ubuntu)
Importance: Undecided
Status: New
** Tags: amd64 apport-bug wily
** Patch added: "Fix above issue by switching to getpwuid as recommended at
https://github.com/applicationsonline/librarian/pull/174"
https://bugs.launchpad.net/bugs/1513446/+attachment/4513349/+files/0001-fix-ruby-error-when-script-is-run-from-a-non-login-s.patch
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1513446
Title:
ruby error when running vim-addon-manager in a non-login shell
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/vim-addon-manager/+bug/1513446/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs