Jump to content

xj4reg

Member
  • Posts

    1
  • Joined

  • Last visited

Posts posted by xj4reg

  1. Thanks Ted!

     

    I notice a issue when I use it to list VMs.

     

    At line 45 of the vmware.rb, 

     

    inventory = File.open(inventory_path)

     

    When it runs to that line, it raise the error of the following

     

    [ERROR: alfred.workflow.input.scriptfilter] Code 1: vmware.rb:49:in `split': invalid byte sequence in US-ASCII (ArgumentError)

    from vmware.rb:49:in `block in inventory_list'

    from vmware.rb:48:in `each_line'

    from vmware.rb:48:in `inventory_list'

    from vmware.rb:25:in `list'

    from main.rb:11:in `generate'

    from main.rb:22:in `list'

    from main.rb:128:in `<main>'

     

    I notice that it's because the file of ~/Library/Application Support/VMware Fusion/vmInventory is encoded in UTF-8 rather than US-ASCII.

     

    I fixed the issue by change the line to 

    inventory = File.open(inventory_path, "r:UTF-8")

     

    Not sure if this change is a valid fix, so just give you a hand up.

×
×
  • Create New...