7d1ff9d4eda3fd50ac1c009204e8c6e3e4ed578b
markd
  Mon Sep 30 17:59:27 2024 -0700
make missing database profile error message a bit clearer

diff --git src/hg/lib/sqlProg.c src/hg/lib/sqlProg.c
index 088289a..fb5644b 100644
--- src/hg/lib/sqlProg.c
+++ src/hg/lib/sqlProg.c
@@ -123,37 +123,37 @@
 //  SYSCONFDIR/my.cnf should be next, but I do not think it matters. maybe it is just /var/lib/mysql anyways.
 
 safef(path, sizeof path, "%s/my.cnf", getenv("MYSQL_HOME"));
 copyCnfToDefaultsFile(path, defaultFileName, fileNo);
 
 safef(path, sizeof path, "%s/.my.cnf", getenv("HOME"));
 copyCnfToDefaultsFile(path, defaultFileName, fileNo);
 
 /* write out the group name, user, host, and password */
 safef(paddedGroup, sizeof(paddedGroup), "[%s]\n", group);
 if (write (fileNo, paddedGroup, strlen(paddedGroup)) == -1)
     errAbort("Writing group to temporary file %s failed with errno %d", defaultFileName, errno);
 
 char *settings = sqlProfileToMyCnf(profile);
 if (!settings)
-    errAbort("profile %s not found in sqlProfileToMyCnf() -- failed for file %s failed with errno %d", profile, defaultFileName, errno);
+    errAbort("profile '%s.*' not found in sqlProfileToMyCnf() -- failed for file '%s' failed with errno %d", profile, defaultFileName, errno);
 if (sameString(prog, "mysqldump"))
     {  // need to suppress the database setting, it messes up mysqldump and is not needed. comment it out
     settings = replaceChars(settings, "\ndatabase=", "\n#database=");
     }
 if (write (fileNo, settings, strlen(settings)) == -1)
-    errAbort("Writing profile %s settings=[%s] as my.cnf format failed for file %s failed with errno %d", profile, settings, defaultFileName, errno);
+    errAbort("Writing profile '%s' settings=[%s] as my.cnf format failed for file '%s' failed with errno %d", profile, settings, defaultFileName, errno);
 
 
 return fileNo;
 }
 
 
 void sqlExecProg(char *prog, char **progArgs, int userArgc, char *userArgv[])
 /* Exec one of the sql programs using user and password from ~/.hg.conf.
  * progArgs is NULL-terminate array of program-specific arguments to add,
  * which maybe NULL. userArgv are arguments passed in from the command line.
  * The program is execvp-ed, this function does not return. */
 {
 sqlExecProgProfile(getDefaultProfileName(), prog, progArgs, userArgc, userArgv);
 }