public static function _apply_profile($_, array &$args)
 {
     $args['credentials'] = CredentialProvider::ini($args['profile']);
 }
 /**
  * @expectedException \Vws\Exception\CredentialsException
  */
 public function testEnsuresProfileIsNotEmpty()
 {
     $this->clearEnv();
     $dir = sys_get_temp_dir() . '/.vws';
     if (!is_dir($dir)) {
         mkdir($dir, 0777, true);
     }
     $ini = "[default]\vws_username = foo\n" . "vws_password = baz\n" . "vws_subscription_token = foo_baz\n[foo]";
     file_put_contents($dir . '/credentials', $ini);
     //putenv('HOME=' . dirname($dir));
     try {
         CredentialProvider::resolve(CredentialProvider::ini('foo', $dir . '/credentials'));
     } catch (\Exception $e) {
         unlink($dir . '/credentials');
         throw $e;
     }
 }