Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-12409

Plugman is unable to uninstall a plugin with a config preferences containing '*'

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.4.1
    • None
    • cordova-plugman
    • None
    • OS: MacOS
      $ plugman -version => 1.4.1
      $ cordova -version => 6.5.0

    Description

      A Cordova plugin we wrote uses a "group filter" which is injected into the iOS app's plist file. The group filter can contain a "*" value, which is default in the Plugin.xml

      Plugin.xml
      <platform name="ios">
              <config-file target="config.xml" parent="/*">
                   ...
              </config-file>  
      
              <preference name="GROUP_FILTERS" default="*" />
      
              <config-file target="*-Info.plist" parent="ConfigKey">
                 <dict>
                    <key>GroupFilters</key>
                    <string>$GROUP_FILTERS</string>
                  </dict>
              </config-file>
      

      The installation behaves as expected, and the group filter can actually be found in the plist file.

      $ plugman install --platform ios --project ./platforms/ios/ --plugin <plugin> --variable GROUP_FILTERS="*" 
      
      Installing "<plugin>" for ios
      

      It is only when you try to uninstall the plugin, that an error occurs.

      $ uninstall --platform ios --plugin <plugin> --project ./platforms/ios/
      Uninstalling <plugin> from ios
      Invalid regular expression: /^*$/: Nothing to repeat
      

      Work-around: manually delete all the references from the Cordova project and reinstall the plugin.
      Escaping the variable when passing it as parameter seems to work.

      Attachments

        Activity

          People

            Nikita Matrosov Nikita Matrosov
            kvandermast Kris Vandermast
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: